Home
About Me
Résumé
Portfolio
DevOps
C/C++
Drupal
Java
PHP
Ruby
Symfony
WordPress
Blog
Astronomy
Fitness
Photography
RDBMS
Technology
WWF
Pictures
Instagram
Galleries
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
Contact
Search for:
Search Button
Home
About Me
Résumé
Portfolio
DevOps
C/C++
Drupal
Java
PHP
Ruby
Symfony
WordPress
Blog
Astronomy
Fitness
Photography
RDBMS
Technology
WWF
Pictures
Instagram
Galleries
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
Contact
Search for:
Search Button
DevOps
Git
August 31, 2022
Table of Contents
GIT
.gitignore
WordPress
.gitconfig
Git Workflows
Git Life Cycle
Git Workflows – Updated
Developing on Mac
Deploying to ROM Development (To be updated)
Start by pulling down the latest changes from master
Branch off to isolate the feature or bug-fix work in a branch
Now you can work on the feature
To keep your feature branch fresh and up to date with the latest changes in master, use rebase
When ready for feedback push your branch remotely and create a pull request
Perform a final rebase cleanup after the pull request has been approved
When development is complete record an explicit merge
a. Merging into victord/production
b. Testing
c. Merging into master
Cleanup
Deploy
a. Deploying into victord/production
b. Deploying into master
Deploying to ROM Staging (To be updated)
Deploying to ROM WWW (To be updated)
Deploying to ROM Scratch (No longer needed)
Deploying to ROM Production (To be updated)
Phase1: Deploying to ROM Tickets Development
Phase2: Deploying to ROM Tickets Staging
Phase3: Deploying to ROM Tickets Production
fatal: The remote end hung up unexpectedly
Installing GIT latest version on CentOS
Removing file from repo
Changes not staged for commit
remote: repository is in read only mode (over 2 GB size limit)
pkg: PRE-INSTALL script failed
Reverting single and multiple files
git status shows typechange
Git log
Unable to git-ftp files to remote server
Unable to git-ftp files to remote server (2)
git ftp push -s production
fatal: Could not upload files
Checking difference between revisions
Removing directories from repo
Dealing with inconsistent repos between VM and Bitbucket
Failed to push some refs
Removing remote URLs
Migrating an SVN repository with history to a new Git repository
warning: you may want to set your diff.renameLimit variable to at least 5990 and retry the command
error: pathspec ‘Initial import.’ did not match any file(s) known to git
Moving directories inside the same Git repo – Restructuring
Moving directories outside another Git repo – Exporting
Moving .git directory into a subfolder
fatal: .git/index: index file smaller than expected
Enabling colors
error: insufficient permission for adding an object to repository database .git/objects
Merge vs Rebase
Renaming Remote Git Repo, now what?
Pushing my branch into the cloud (Bitbucket)
Pushing my branch into the cloud (Bitbucket) fails
error: unable to unlink old ‘[FILE]’: Permission denied
Master is ahead
Git Merge
Git Rebase
Fixing Git Conflicts
Solution for MacOS:
Solution for CentOS:
More Git Branching & Rebasing
Solution 1.
Solution 2.
Solution 3.
Solution 4. (non-cli)
Example 1
Example 2
Example 3
Example 1 (cont.)
Example 1 Summary
Example 2 (Not yet solved)
Getting latest Git tag
Getting latest Git commit
Ignoring line breaks, EOL characters
Git Status – Unseen message
Git pull – Issues with Nano
Reverting back to a previous commit
Git branch behaves like ‘less’
Updates were rejected because the tip of your current branch is behind
Search for branches
Losing your HEAD: HEAD detached
Git Resolve
Similar Problem
Git Pulling without specifying how to reconcile divergent branches is discouraged
ROM Tickets – Git Workflows and CD/CI Pipelines
Branch Development
A Special Case (1)
A Special Case (2)
A Special Case (3)
A Special Case (4)
A Special Case (5)
Summary of commands (TO BE REVIEWED)
Git Pull Force
Git Pull Warning
Git Deletes Files
Git Pull Errors (1)
Changing a committed message
Your branch and ‘origin/development’ have diverged
Removing remote URLs for a branch
Git Pull Errors (2)
detected dubious ownership
Deleting branches that have been merged to master
Renaming branches
Git Reset
Rebasing – Altering Git History (1)
Rebasing – Altering Git History (2)
fatal: Need to specify how to reconcile divergent branches
Main => Master
Bitbucket
ROM Bitbucket Auto Deployment (Completed. See T2.)
Setting up an SSH key
Step 1. Set up your default identity
Step 2. Add the key to the ssh-agent
Step 3. (Mercurial only) Enable SSH compression
Step 4. Add the public key to your Bitbucket settings
Setting Up Bitbucket Pipelines
Step 1: Add an SSH key in Bitbucket
Step 2: Update the known hosts (This step is unnecessary. See T14 below)
Step 3: Add the public key to a remote host
Step 4: Add the public key into the Bitbucket repo
git ftp push -s production
Permission denied (publickey)
Pipeline gets stuck
Pipeline gets stuck (2)
Pipeline fails to execute git ftp init
Creating Git repositories automatically on romlx16, upload to Bitbucket, and finally sftp back to romlx16
Creating Git repositories automatically on MacOS, upload to Bitbucket, and finally sftp to remote VM
git ftp push -s init fatal: Remote host not set
git ftp init -s prod fatal: Can’t access remote
curl: (60) SSL peer certificate or SSH remote key was not OK
Re-introducing Pipeline
Unable to add my hostname into Bitbucket
curl: (1) Protocol “sftp” not supported or disabled in libcurl
curl: (7) Failed to connect to 192.75.204.16 port 60: Connection refused
Renaming Remote Git Repo, now what?
Pushing my branch into the cloud (Bitbucket)
Host key verification failed
fatal: Could not read from remote repository.
Bitbuket pipeline changes the owner and permission of files
Dishan unable to git push
INTERESTING!
Cannot pull with rebase
Connection timed out & Host key verification failed
Disabling user accounts
Pipeline failed – git config user.email commits-noreply@bitbucket.org
Email notifications
Pipeline failed
Git Workflows and CD/CI Pipelines
The authenticity of host ‘bitbucket.org (104.192.141.1)’ can’t be established
GitHub
GitHub Auto Deployment
GitHub Actions
GitHub Desktop
Actions.runner … Failed to execute command: Permission denied
i/o timeout
Your personal access token is about to expire
Adding/Updating AWS Security Group for GitHub
git@github.com: Permission denied (publickey)
Resources
devops
,
git
Written By victord On August 31, 2022