In order to avoid conflicts, first I have to update my feature branch. So I have to merge release-test into feature.
Don't: you should always merge from specific to integration branches, not the reverse.
- Your
feature
branch is a specific branch (specific for a given task you are isolating in its own branch)
release-test
is an integration branch (where multiple branches come to be merged)
If you need to update your feature
branch compared to release-test
, rebase it:
cd /path/to/local/repo
git switch feature
git fetch
git rebase origin/release-test
# resolve potential conflict there
git push --force
That will guarantee there won't be any conflict in your PR (automatically updated after the push --force
), since your feature
branch will only add new commits on top of the most recent remote release-test
branch.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…