Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Branch colours in the graph

In the log view in SourceTree, in the Graph column I can see a number of different coloured lines. How do I know what colour each line corresponds to?

Thanks

like image 757
Breako Breako Avatar asked Aug 02 '13 12:08

Breako Breako


1 Answers

I'm not sure this an answer (in that it doesn't solve your problem), but I don't think that feature is currently available in SourceTree, at the moment the colours for the branches are assigned at random (although picked in a particular order).

There are requests for such a feature: https://jira.atlassian.com/browse/SRCTREE-1191

There's also a response from an Atlassian developer highlighting the difficulty in implementation:

In git, branches are never an attribute of a commit, they're simply pointers to a single commit which move as you commit to that branch, so the history is built by association via the parent links, and each commit has no branch information associated with it. This means moving branches around is very easy in Git, which is one of its strengths, although it can be confusing not to see an explicit branch in the commit metadata like you're used to in other systems. Technically the graph lines are just ancestry lines, not branch lines (although often the two are aligned).

like image 124
Chris Avatar answered Sep 26 '22 09:09

Chris