-
Notifications
You must be signed in to change notification settings - Fork 229
Using git for the Integration Candidate Merge Process
Gerardo E. Cruz-Ortiz edited this page Sep 16, 2020
·
2 revisions
Always reset the integration-candidate before starting a new cycle:
git checkout main
-
git pull
Pull on the main branch to confirm that your localmain
matches the remote
-
git branch -D integration-candidate
Delete your local integration-candidate. BE CAREFUL -
git checkout integration-candidate
. This should be in line withmain
-
git log
inspect thatmain
,integration-candidate
, ANDremote/main
are all in line -
git branch -u origin/integration-candidate
This "connects" your localintegration-candidate
with the remote on GitHub -
git status
check that your localintegration-candidate
is connected to the remote. They have possibly have diverged. -
git push
This will probably be rejected. You'll get an error similar to the one below
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and integrate the remote changes
hint: (e.g. 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
-
git push --force
, you'll get a confirmation like the one below
+ 576910b...ffb30d8 integration-candidate -> integration-candidate (forced update)
-
git checkout integration-candidate
. This should be in line withmain
git pull
-
git rebase main
Bring integration candidate up to main, -
git status
check that your localintegration-candidate
is connected to the remote. They have possibly have diverged. -
git push
This might be rejected. You'll get an error similar to the one below
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and integrate the remote changes
hint: (e.g. 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.