Actions

EmSys

Git - Viewing Diverging Branches

From EdWiki

GitLab - Viewing Diverging Branches

  • Goals
    Learn how to view diverging branches in a repository.
  • View the Current Branches

We now have two diverging branches in the repository. Use the following log command to view the branches and how they diverge.

git hist --all

Here is our first chance to see the --graph option on git hist in action. Adding the --graph option to git log causes it to draw the commit tree using simple ASCII characters. We can see both branches (greet and master), and that the master branch is the current HEAD. The common ancestor to both branches is the “Added a Makefile” branch.

The --all flag makes sure that we see all the branches. The default is to show only the current branch.