Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sourcetree and GitFlow - not showing color branches

Code base getting large. Decided to get better at GIT...

I am using xCode and decided to move away from xcode git and to SourceTree. I am keeping my code local on my machine but would like to get into the git flow habit. I opened Sourcetree and imported my project. All looks good.

I did a final commit and initialized GitFlow. But as I move from Master branch to Development Branch to creating Feature Branches, I see the branch names in the log, but I do not see the parallel gitflow colored lines. Is that because my project is local and I am not doing any Pull/Push? or am I missing a setting?

PS: Using xcode 5. Not sure if related.

like image 603
Khaled Barazi Avatar asked Jun 20 '13 22:06

Khaled Barazi


People also ask

How do I sync branches in SourceTree?

Under Branches, double-click the feature branch that is behind to switch to that branch. Click the Merge button. From the popup that appears, select the commit you want to merge into your feature branch. Check the Create a commit even if merge resolved via fast-forward option at the bottom.

What is Gitflow?

What is Gitflow? Gitflow is an alternative Git branching model that involves the use of feature branches and multiple primary branches. It was first published and made popular by Vincent Driessen at nvie. Compared to trunk-based development, Gitflow has numerous, longer-lived branches and larger commits.


2 Answers

You're getting a flat graph because you have a flat history:

As soon as you're committing to another branch, the difference is shown:

git checkout develop
# make some changes
git commit -m "Changes to develop"

Starting and committing to another feature branch in parallel results in something like this:

like image 187
Stefan Avatar answered Sep 23 '22 12:09

Stefan


In addition to Stefan's answer it might be because of your log filters being set in such a way that it won't show the other branches which would be worth checking. If it's set to 'current branch' you may only have one line of development. Also, if you have a flat history as mentioned (which is often the case) then it'll show a singular line of development.

like image 43
Kezzer Avatar answered Sep 24 '22 12:09

Kezzer