Rebasing

All these extra merge commits you can get from merging and cherry picking make a mess of your commit history. They are all superfluous commits that only exist because you need to merge some changes. Instead of merging, you can rebase your branches. When you rebase a branch, you are basically saying your branch was not branched from commit A, but from commit B. So, imagine you are working on a feature branch, but you do want to keep up with the master branch so your branch is not left behind on features. Besides, if you do not pull regularly, the chances of conflicts increase and it is easier to solve them as they come. Instead of merging or cherry picking everything your coworkers do, you can simply rebase your branch:

git checkout ...

Get Continuous Integration, Delivery, and Deployment now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.