GitFlow finish feature doesn't rebase, create a "merge commit" instead

I'm not sure but something might not be working correctly in sourcetree (windows app in my case).

We always use the built in GitFlow UI feature, which is great. But here is the issue.

  1. Click GitFlow > "Start feature" and mention the name of the feature. In the following case "#2959" ( which is an issue number)
  2. Work and make a few commits in the newly created "feature/#2959" branch
  3. Click GitFlow > "Finish feature" and check the "rebase" option.

Here is the result:  

Capture d’écran 2014-10-20 à 16.59.10.png

59cb57a is the source revision

a357127 and 715136d are both commits made to the feature branch before finishing.

06fdab5 is the resulting "merge commit" which, if i'm not mistaken, shouldn't be here if i checked the rebase option.

My 2 dev commits should just be on top of 59cb57a and 715136d should now be the head of develop. Am I right?

2 answers

1 accepted

0 votes
Answer accepted

Alright I found the answer (not the fix) : :

Apparently this is a "normal" behaviour of gitflow explained here :


Sourcetree correctly call gitflow using the -r command. This basically means :

"Try to rebase (merge with fast-forward) this (feature) branch on top of develop. Only if possible and if there is only one commit on it."

This means that in my specific use case shown above it fails because there are 2 commits on my feature branch. If they were 1 then the rebase works. I'm not really a fan of this as I believe gitflow should FF even when more than 1 commits or at least expose this choice to the user (sourcetree could then expose this up to the GUI).

Hope it helps anyone coming here.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Oct 23, 2018 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...

1,230 views 4 2
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you