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 /usr/local/bin/git-flow
What is wrong here?
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: https://jira.atlassian.com/browse/SRCTREE-1183
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:
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.
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: http://yakiloo.com/getting-started-git-flow/) and which git-flow gives me
which git-flow /usr/local/bin/git-flow
though if I read correctly it is not necessary.
Wonder what else I am doing wrong. Any idea?<body></body>
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 = email@example.com:muellerj/xxxxxxxx.git [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: http://blog.sourcetreeapp.com/2012/08/01/smart-branching-with-sourcetree-and-git-flow/
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!
Happy Friday Everyone! Today marks the international release of Disney's live action version of the animated classic Aladdin. I know that this movie was met with some controversy of over cast...
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