Graphic explaining how Git rebase works

I found this really useful and I’m keeping it in my wall as a reference. I don’t know who to give credit to, as this was a paste from freenode #git and who did doesn’t know to, sorry! But here’s the docs ( http://jk.gs/git-rebase.html )

The following explains how GIT rebase works:

Initial state:
==============

A - B - C - D - E - F - G - H  master
             \
              \
               I - J - K - L  feature


REBASE: After git checkout feature; git rebase master:
======================================================

A - B - C - D - E - F - G - H  master
                             \
                              \
                               I' - J' - K' - L' feature


After git checkout master; git merge feature:
---------------------------------------------

A - B - C - D - E - F - G - H  
                             \
                              \                  master
                               I' - J' - K' - L' 
                                                 feature

aka. 
                                                  master
A - B - C - D - E - F - G - H - I' - J' - K' - L' 
                                                  feature




MERGE: After git checkout master; git merge feature:
====================================================

A - B - C - D - E - F - G - H - M  master
             \                /
              \              /
               I - J - K - L  feature
comments powered by Disqus