GitFlow "broken" on v 0.9.3.0?
Asked by Johan Leino:

Hey,

after upgrading to v 0.9.3.0 I get this whenever starting a new feature (test in this example):
> *git flow feature start test*
>
> *git: 'flow' is not a git command. See 'git --help'.*
>
> *Did you mean one of these?*
>
> *reflog*
>
*show*  
The repo has been initialized before and worked with previous version (click-once btw)  
Ideas?  

**Update**  
I get this on a fresh repo when trying to init GitFlow:  
> *git flow init -d*  
> *git: 'flow' is not a git command. See 'git --help'.*  
> *Did you mean one of these?*  
> *reflog*  
> *show*


Answers:
author: stevestreeting
body: We did change how git-flow was located in 0.9.3, in order to fix a couple of problems with the 'rebase' option of finishing features and releases, however I've tested this on a couple of machines without any issues, using both the system Git install and embedded Git install. Both init and other functions appear to work fine.

The change was that instead of directly calling the git-flow script, we add its location to the PATH, which allows it to call itself. The location is %USERPROFILE%\\AppData\\Local\\Atlassian\\SourceTree\\gitflow_local, can you check if that exists for you? If it does, can you confirm the full path?

comments: author: Johan Leino
body: No, that location is not in my PATH.  
However, I added this manually **%USERPROFILE%\\AppData\\Local\\Atlassian\\SourceTree\\gitflow_local\\gitflow** and that seemed to do the trick.


author: stevestreeting
body: Sorry, I actually meant that SourceTree adds this to the PATH of the git process when it calls it - it doesn't alter your global PATH. It's interesting that adding this to your PATH worked though, that makes me wonder if your PATH is already quite long or something like that which is stopping the SourceTree addition to the git processes PATH from working?


author: Johan Leino
body: Ah, ok got it. No my Path ain't that long. It's not a permission issue?? Also, note that the location I added wasn't the same as you posted but that might have been a typo on your side perhaps!?


author: stevestreeting
body: Sorry, I forgot to add the subfolder to the path I listed above. I'm not sure why adding it to your global PATH is any different to us adding it to the git process PATH, the latter seems to be fine here and any permissions should apply both ways.

What I've done instead for the next version is to use a middle ground where we call the git-flow script explicitly (like we did in 0.9.2.3), but \*also\* add the gitflow scripts to the git processes PATH to resolve the recursive call issues that came about from using the 'rebase' option. Hopefully that should resolve your issue since the former worked for you before, while also solving the problem that had been raised by others.


author: Johannes Kilian
body: Same here: fit flow does not work anymore after updating...

Trying to perform a hotfix results in:

```
git flow hotfix start TST1bash.exe: warning: could not find /tmp, please create!/bin/sh: C:\Users\xxx\AppData\Local\Atlassian\SourceTree\gitflow_local\gitflow\git-flow: No such file or directoryfatal: 'flow' appears to be a git command, but we were notable to execute it. Maybe git-flow is broken?Completed with errors, see above.
```

Questions/Hints:

\* Which tmp is being looked after?

\* C:\\Users\\xxx\\AppData\\Local\\Atlassian\\SourceTree\\gitflow_local\\gitflow\\git-flow exists for sure on my machine ...


author: Johannes Kilian
body: Updating to SourceTree 0.9.4 resolves my issues described above


Tags: git-flow

windows