Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Is there a way to control the order of branches shown in the graph in SourceTree?

matt_h August 13, 2015

I'm using GitFlow, and it sure seems like it would be a more intuitive ordering of the lines in the graph in SourceTree if the left-most line were always 'master', after that any 'hotfix' branches, then the 'release' branch (if present), then 'develop', followed (right-most) by any 'feature' branches.

I know this is a trivial benefit that would probably require significantly complicated programming on Atlassian's part and is therefore probably not worth the effort.  However, it would be awfully nice, so it seemed worth asking just in case there is already some way to achieve this result (or something similar).

4 answers

1 accepted

2 votes
Answer accepted
Johannes Kilian
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 13, 2015

Your request would make sense, if gitflow would be the "one-and-only" branching model. If this ever would be implemented (which iI doubt), it should be optional - as there a few other branching models (and as some people might already be comfortable with the current situation wink)

SourceTree uses the common way of visualizing git-logs. The dynamic ordering of branches has been asked and discussed here on this site many times already.

You might have a look here:

 

 

matt_h August 14, 2015

That makes sense, thanks. And I agree: it should be optional. Maybe a simpler request would be to let people define some strings to match against to control the colors of the various branches. For example, I could then set SourceTree to always make the "master" branch blue, and any branches starting with "feature" yellow, etc. Anyway, thanks for the explanation and links.

Like # people like this
Tim Crall
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 14, 2016

Sure, it should be optional, but I think that putting the master branch always on the left would be useful for GitHub Flow, too.  I'm not sure what strategies is would be harmful to

Like # people like this
Johannes Kilian
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 14, 2016

git does not have any preferred branch - any branch is equivalent. Even master is not an extraordinary branch - it has its extraordinary meaning only by convention. The main branch has not to be named "master" - If I establish (only by personal convention) to have a branch named "Garbage" to be the main branch, branch "master" has not even to be available.

So I think it would be better not to have the branch named "master" to be the main branch, but rather to have a possibility in SourceTree to define the Standard-Branch. This standard branch should be treated specially (for example: to be configurable to be shown "always on the left" in the graph - but this should be optional)

BTW: BitbucketServer allows to define a "Standard Branch" per repository

ivangretsky March 15, 2016

Can we achieve custom sort oder with git branch --sort somehow?SO it can be easilly adjusted?

 

2 votes
ivangretsky March 14, 2016

That is a wonderfull suggestion. There already is an option to choose branch odering. But gitflow ordering is not in the list. As SourceTree supports gitflow workflow it would be nice to make it look as it is natural to the methodology. Please consider implementing it!

 

0 votes
troy harvey February 13, 2018

This. Due to 3rd party repo integrations, much of the Git workflow is migrating to feature branching of some flavor.

Master is the de-facto branch in these workflows. Having it float all over the place is hard to manage.

0 votes
Tim Crall
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 14, 2016

I wish it existed as an option, too.  But I think you hit the nail on the head in terms of coding complexity to payoff, from Atlassian's point-of-view, because SourceTree pretty much just uses git's branch graphing logic without altering it, and to git a branch is a branch is a branch.

Still, if you want to make the suggestion to Atlassian, the proper place to do that is jira.atlassian.com - where I expect you might find existing feature requests you could vote for. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events