How to read git log graph

In the git community book, it says

Another interesting thing you can do is visualize the commit graph with the ‘–graph’ option, like so:

  • git get new file from repository
  • Pushing git repository to Xcode
  • Git push default to github
  • git log --follow, show all commits including merges
  • How to configure 'git diff' to use emacs diff
  • Import a Python library from Github
  • $ git log --pretty=format:'%h : %s' --graph
    * 2d3acf9 : ignore errors from SIGCHLD on trap
    *   5e3ee11 : Merge branch 'master' of git://
    | * 420eac9 : Added a method for getting the current branch.
    * | 30e367c : timeout code and tests
    * | 5a09431 : add timeout protection to grit
    * | e1193f8 : support for heads with slashes in them
    * d6016bc : require time for xmlschema

    It will give a pretty nice ASCII representation of the commit history lines.

    How should I read this graph? How does 420eac9 differ from the rest?

  • GBP £ symbol in ASCII php file being converted to £ on live server (transferring with git)
  • Doing git-push without origin master
  • New Git branch without changes from a previous commit
  • Is there a way to re-order Git stashes?
  • How return previous stage after using git reset --hard?
  • Revert commits of local branch from master
  • 2 Solutions collect form web for “How to read git log graph”

    The asterisks show where something was committed:

    e1193f8, 5a09431 and 30e367c were committed to the left branch (yielding a | on the right branch) whereas 420eac9 was committed to the right branch (yielding a | on the left branch). And that is what 420eac9 does different from the rest: it’s the only commit to the right branch.

    For the sake of completeness:

    • d6016bc was the branching point
    • 5e3ee11 is the merging commit
    • 2d3acf9 is the first commit after merging

    420eac9 is on a different branch than the 3 commits “below” it. The branches diverged after d6016bc and they were merged in 5e3ee11.

    Git Baby is a git and github fan, let's start git clone.