Let's say we have 2 branches: main and develop. develop is ahead of main since the team has been adding features to the project since the last production release. main is ahead of develop because there was a production release recently.
When the action runs, it will fail during rebase:
git switch main
git pull
git switch develop
git pull
git rebase main # FAIL
git rebase will revert some commits where develop is ahead of main. In this scenario, we have to use git merge to merge in commits from main into develop.
Let's say we have 2 branches:
main
anddevelop
.develop
is ahead ofmain
since the team has been adding features to the project since the last production release.main
is ahead ofdevelop
because there was a production release recently.When the action runs, it will fail during rebase:
git rebase
will revert some commits wheredevelop
is ahead ofmain
. In this scenario, we have to usegit merge
to merge in commits frommain
intodevelop
.