I create a lot of Git branches. Every change I do is a branch. That means I perform a lot of Git merges. Here’s how I do it.
Read about my Git workflow here.
Assume there’s a dev branch called ‘Fingerboard’ that I need to merge into ‘master.’ The Fingerboard branch has been committed to the Git repo.
git checkout master git pull origin master git merge --no-ff Fingerboard
The –no-ff keeps Git from flattening the history for the branch.
Once the merge is complete, the Fingerboard branch is no longer needed.
git branch -d Fingerboard git push origin --delete Fingerboard