Git Merge and Rebase Explained

Git has become the de facto standard version control system. Many people find it confusing or even impossible to understand. In actuality, Git is based on some simple ideas that, once understood, make Git almost transparent. An example of this is Tom Preston-Werner’s explanation of Git as taking a series of snapshot of your file system. Once you understand the idea of taking snapshots, a lot of the mystery of what Git’s doing dissolves.

Still, there are Git functions who details are not obvious. A couple of these are merge and rebase—especially rebase. Alex Ford has an excellent three part post on how merge and rebase work and when you should use each. Ford uses screen shots from SourceTree to show the state of the commit graph as a branch is created and then merged to make the merge process clear. Then he repeats the process with rebase so that you can see how the two commands differ.

This is the clearest explanation of the difference between merge and rebase that I’ve seen. If you’re at all unclear about them, Ford’s posts can help you achieve enlightenment.

This entry was posted in General and tagged . Bookmark the permalink.