Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to read the Graph in SourceTree, part 2

I found this other question here that seeks general understanding of the SourceTree history graph. There was a start of an answer, but I want to take it further. I'd love to get pointers to documentation or other helpful information. However, I will ask a few specific questions about this particular case.


For the given Git repository, I have 8 branches local and I have highlighted an additional branch that is only remote.

  1. How can I tell which vertical track goes with which branch?
  2. The diagonal lines I understand as indicators of merging and branching. Some of these have one colored circle end point anchored on one of the tracks, but none have two. How do I tell which branch they came from or are going to. 
  3. Many of the lines push right past the rightmost track. Does that indicate they are anchored to a branch not shown?
  4. How can I control which branches are shown?
  5. With the branch highlighted, I get the blue bar across the graph/description windows. That doesn't indicate a merge or branch - so what is happening there?

Of course, any pointers to further documentation would be greatly appreciated. 


2 answers

1 accepted

4 votes
Answer accepted
  1. You can't. Despite the visual image brought to mind by the word "branch", in Git, a branch refers to one commit. Each commit can have one or two parents. The graph is just a visual representation of that chain of relationships. If you want to find what branch(es) are descendants of a line, you can only scroll up until you find commits on the line that have connected branches.
  2. The diagonal lines should always go "to" a commit. To find where they come from, follow them to the opposing vertical line, then follow that line down to the first commit on that line. The only know way to know what branch(es) were involved at the time of the merge is if the committer listed them in the commit comment.
  3. No, it means the display area for the graph isn't wide enough. You can click and drag between the column headers to resize it.
  4. You can control which branches are shown at the top, but options are limited. You can show just the current branch, or all branches. You can also choose whether the graph should include remote branches or not (origin/...).
  5. It indicates a commit that is on a line that is outside the visible part of the graph. As mentioned in (3), resize the graph to find the dot representing that commit. EVERY row in that list represents a commit, and will have a corresponding dot on the graph.


@Seth, it appears that you and I were writing the same answer at the same time!

Yeah, good to have both though as confirmation/clarification.

Agreed, @Seth. As my brother is fond of saying, "GMTA!" (Great minds think alike!) LOL

First of all, may I suggest you get a good book or online training course on Git and study up? Getting these concepts straightened out will serve you well if you are going to be using Git.

The commit, not the branch is the fundamental unit of work in Git. Everything depends on the commit. A branch is nothing more than a pointer to a specific commit. This is true even for master and HEAD. I think you might be confusing these two concepts which leads to your questions.

  1. You can't because the vertical tracks do not necessarily go with a specific branch. These tracks follow the lineage – parent to child – from one commit to the next. This lineage is fundamental to Git's operation. 
  2. These lines show lineage, .e.g., commit 22e4035 is parent to commit 2394ed5. The branch, is only a pointer to the commit that is the current "top-of-the-world" for the branch. Remember this: a branch can be deleted, a commit cannot. 
  3. The lines that run to the right are showing lineage to a commit that exists, but that is not visible. Go to the Graph column header and stretch the column to the right. They'll appear.
  4. Use the button above the Graph column header. It defaults to "All Branches". You can change it to "Current Branch". There are no other options currently.
  5. That blue bar isn't highlighting the branch. It is highlighting a commit. You see a branch name here, because that branch current points to that commit. A commit means that something that was changed was committed to the repository. That could be a merge or a branch or just checking in some files that were edited.

Hope that helps.

YW, @Kevin Buchs.

Commits that do not have any connection to any branch or tag label will not show up in the Sourcetree ui or git log, so deleting a branch can make 9,000 commits just disappear.

If you had recently checked out the branch before you deleted then a reference to it will be shown in the git reflog command list and you can then create a new branch or tag from the commit hash shown there. 

The graph was very obviously designed by a coder. If it had been designed by a UI/UX Engineer, it would've had much more utility, I think.

A graph is a visual representation, a metaphor, if you will, abstracting esoteric information such as statistics or formulas or, in this case, relationships into an image everyone can understand. A metaphor should be readily recognizable at a glance, it should have a representation that a person can recognize. The mere fact that this graph spurs so many questions and requires such repeated and meticulous explanation makes it a bad metaphor, a bad visual representation, and therefore a bad graph.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

3,418 views 4 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you