When trying to commit using Sourcetree, getting following error

git -c diff.mnemonicprefix=false -c core.quotepath=false commit -q -F C:\Users\Admin\AppData\Local\Temp\ldlruhbf.ejs

*** Please tell me who you are.


  git config --global user.email "you@example.com"   git config --global user.name "Your Name"

to set your account's default identity. Omit --global to set the identity only in this repository.


But when tried to Run the commands from command line it does not recognize "git".

6 answers

1 accepted

1 vote
Accepted answer

Hello Pavan!

First of all: as already asked by Seth, are you using Windows' Command Prompt (cmd.exe) or SourceTree's Terminal? It's recommended that you use SourceTree's own Terminal, but you can also do some adjustments in order to have your Windows' Command Prompt setup for git commands.

  1. First and foremost, download Git from its website;
  2. When installing the software, you will be prompted for the manner you prefer to use Git, like below:image2015-1-6 11:58:56.png
  3. Only having Git setup for the command prompt will make the commands you ran before work just fine, but you can also choose the latter option, just be aware of the possible consequences;

information If you already have installed Git by following the above procedure, please follow the instructions below to add Git's executable as an Environment Variable.

  1. Look for the Git's installation path (normally under C:\Program Files\Git, but can also be under C:\Program Files (x86)\Git if you use a x64-based Windows version);
  2. Inside the installation folder, go to \bin directory and copy the path to it;
  3. Then, go to "Control Panel > System" and, on the sidebar of this window, click in "Advanced system settings";
  4. Go to the "Advanced" tab and click in "Environment Variables..." on the bottom of the window;
  5. Under "System variables", click twice on "Path";
  6. Move the cursor to the very end of the "Variable value:" field, add a semi-colon and paste the path to the \bin folder that you got on the first step;

tick That's it! You should now be able to run git commands from Windows' Command Prompt!




Windows or Mac? Did you open the command line from the OS, or use SourceTree's "Terminal" button?

Thanks Seth! On Windows. I Staged the file which needed to be Checked In/Commit. Then clicked on Commit button.

Please let me know if there is a quick step guide on how to use SourceTree.

For my second question, I meant when you tried to run from the command line. Did you run a typical command prompt (for example, Run -> cmd)? If so, that probably won't work. Try hitting the "Terminal" button in SourceTree and then running the git config command.

Thanks Seth! Got it working!

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...

959 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