When trying to commit using Sourcetree, getting following error
Asked by PavanN:

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.

Run

git config --global user.email "[you@example.com](mailto:you@example.com)" git config --global [user.name](http://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".**


Answers:
author: Jo?o Palharini
body: 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](http://git-scm.com/download/win);
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](/html/@4DF2F60CA30FBCA0CD7B960B5D0F871B/images/emoticons/information.png "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](/html/@FB21E167CF5FC78FA9216CD8178453B3/images/emoticons/tick.png "tick") That's it! You should now be able to run `git` commands from Windows' Command Prompt!

Regards!

-Joao  
[](https://community.atlassian.com/t5/Sourcetree-questions/When-trying-to-commit-using-Sourcetree-getting-following-error/qaq-p/92252?attachment-id=6325){#link_116ab65634b307}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/2638/1/image2015-1-6%2011%3A58%3A56.png){#display_116ab65634b307_0}


author: PavanN
body: Thanks Seth! Got it working!


author: Seth
body: 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.


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


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


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