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

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

Sourcetree cannot find git-flow (OSX Mountain Lion)

I used the "Git Flow" button in Sourcetree to initialize my repository and successfully started a feature. But when I click Git Flow / Finish Current, choosing "rebase on development" and "delete branch," I get the error, "git: 'flow' is not a git command. See 'git --help'."

This does not happen if I don't choose "rebase." Then it properly finishes the feature and merges it into my develop branch.

This does happen whether I use the embedded git or the system git. git-flow is installed on my command line and in my path:

$ which git-flow

What is wrong here?

5 answers

1 accepted

0 votes
Answer accepted

Hmm, you actually don't need to have git-flow installed locally, it's included in the SourceTree package and the same version used regardless of whether you use the system git or embedded git (this is because git-flow in SourceTree includes a few fixes, which have been accepted upstream but aren't in the official release yet).

However, I can reproduce this here too with a test project.

Logged as a bug here:

Thank you -- I didn't think I would have to install it locally, but I thought it would have helped when I switched it to using the system git. In any case, appreciate the quick response.

Using OSX 10.8.2, SourceTree 1.5.4, embedded git and git-flow:

The git-flow operation mentioned above (finish feature with rebase), now produces this error:

Will try to rebase 'testfeature'...
git: 'rebase' is not a git command. See 'git --help'.
Finish was aborted due to conflicts during rebase.
Please finish the rebase manually now.
When finished, re-run:
    git flow feature finish 'testfeature' 'develop'

I used the test case from the associated bug report:


  1. unpack the test repo and import into SourceTree
  2. check out feature/testfeature
  3. run Git Flow -> Finish Current for Feature: testfeature.
  4. check "Rebase on development" and click "OK"

Of course, I see the same problem in my own repos as well.

Perhaps the cause (additions to PATH required) is the same? External Git + external git-flow works fine, e.g., git flow feature finish -r testfeature.

I've logged this for investigation here:

that's weird. I ran into the same issue (can't select any features even though the features exist).

I even installed git-flow globally (using the sh provided in this tutorial: and which git-flow gives me

which git-flow

though if I read correctly it is not necessary.

Wonder what else I am doing wrong. Any idea?


Yeah, you don't need to install git-flow yourself, in fact if you do (and choose to tell SourceTree to use your version, which you do in Preferences > Git), it's very important you have some recent updates to git-flow that ST relies on. But unless you've told ST to use your own git-flow that shouldn't be an issue (the changes ST relies on are basically just extra params and some UI-friendly behaviour, no imcompatible changes).

So the fact that you can get to that dialog at all means you have a git-flow config in your repo as expected. The only thing I can think of is that git-flow doesn't know that you're using the 'feature/' prefix. Does the .git/config inside your repo say in the [gitflow "prefix"] section that "feature = feature/" ?


yes, that prefix is there. Here's the content of the config file:

repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true [remote "origin"] fetch = +refs/heads/*:refs/remotes/origin/* url = [branch "master"] remote = origin merge = refs/heads/master [gitflow "branch"] master = master develop = RT-438 [gitflow "prefix"] feature = feature/ release = release/ hotfix = hotfix/ support = support/ versiontag = [branch "feature/TEST"] remote = origin merge = refs/heads/feature/TEST

OK, I think the problem is that your 'develop' branch is configured to be 'RT-438', but you have no such local branch. git-flow can't work like that, you must have manually deleted the branch afterwards or something. You can't finish a feature because there is no develop branch for it to merge back into! I should have spotted that you had too few local branches for git-flow in your original screenshot.

The normal branch name for develop is 'develop', so it would be best to create a develop branch (presumably at master), change your gitflow config so that 'develop = develop', and then it will work.

For a review of what exactly master & develop do, you might want to check out my blog post:


thank you for the support. I redid everything and I think I know what was missing at the beginning: I had to click the gitflow icon once and then initalize. I probably skipped the dialogue with [esc] in the first place because everything looked OK and I did not change anything. I understand it now - thanks again.

The linked article is also very helpful.

have a great day!

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Team Playbook

Atlympic Event: Team Playbook

Hello Community!  Quick disclaimer: We are running a contest on Community (The Atlympics!) from July 23rd - August 8th of 2021. If you are interested in participating in this contest (prizes! ...

65 views 0 8
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