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

How to fix this GitFlow error

I just installed sourcetree on a new PC and I have cloned my Repository, but when I try to use the GitFlow button I am getting this error:

sh.exe "C:\Users\MyUserName\AppData\Local\Atlassian\SourceTree\gitflow_local\gitflow\git-flow" init -d
/usr/bin/sh: "C:\Users\MyUserName\AppData\Local\Atlassian\SourceTree\gitflow_local\gitflow\git-flow": No such file or directory
Completed with errors, see above.


Any Idea how to fix this?

5 answers

I see, the special character is in your Username. That could definitely be the problem. Git runs in a MinGW terminal, which is a linux emulator, and it may handle special characters like that differently than its windows environment. You might install your own copy of Git in another folder (C:\Program Files or something), and set SourceTree to use System Git instead.

I am going to try that but I think I already did and it kept looking for the git on the users folder

I had the same problem, with a "Ö"-character in the folder in "Users" that caused a "No such file or directory" error from sh.exe when executing git-flow.

I used Windows Process Monitor (, filtering events by a rule "Process Name contains sh.exe" to find where sh.exe is looking for git-flow.

I found that it's looking under my git folder C:\git\projname, appending the full path to git-flow under it, but using some invalid characters in the path:

C:\git\projname\C\Users\Kenneth Österberg\AppData\Local\Atlassian\SourceTree\gitflow_local\git-flow

I created the folder structure under my git folder, and added the folder to my ".gitignore" file like:

/C/Users/Kenneth Österberg/AppData/Local/Atlassian/SourceTree/gitflow_local/gitflow

I copied the files from C:\Users\Kenneth Österberg\AppData\Local\Atlassian\SourceTree\gitflow_local\gitflow to the folder structure.

After this I was able to use Git Flow from the SourceTree GUI.

When I try to clone my repository I get this error:

Checking out files: 100% (1855/1855), done.
/usr/bin/sh: "C:\Users\Sócrates Medina\AppData\Local\Atlassian\SourceTree\git_local\mingw32/libexec/git-core\git-submodule": No such file or directory
fatal: 'submodule' appears to be a git command, but we were not
able to execute it. Maybe git-submodule is broken?

Completed with errors, see above.

I am using embedded Git, My user folder is called "Sócrates Medina" I don't know if the special character may be causing the problem.

If I browse to that folder I can see all the files there.

Any ideas?

Are you using embedded or system git?

Tools > Options > Git - look in the Git Version box.

Suggest an answer

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

7,025 views 5 13
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