Git on cmd windows
I want to run Git commands directly on windows CMD,
I downloaded Git from here http://msysgit.github.io/ but it has its own terminal called “Git Bash.vbs” and it consider the installation directory as the root.
Any answers even ‘No you can’t run it on CMD terminal’ would be apprciated.
2 Solutions collect form web for “Git on cmd windows”
The Git for Windows installer actually has a setting to set the PATH accordingly, so you can run Git from within the Windows command lines (
cmd.exe, and also PowerShell, but anywhere else too). You just need to select the option when installing:
As the installer says, if you select “Run Git from the Windows Command Prompt”, it will add (only) Git to the PATH, and you can simply execute it from other places. The default, “Use Git Bash only”, will not set the PATH but requires you to run the bundled Git Bash to use Git.
Assuming Windows 7 is your OS: Go to Control Panel->System->Advanced System Options->Advanced->Environment_Variables(button near bottom).
You should see at least three variables there: PATH, TEMP, TMP
Click on PATH, click edit.
Scroll to the end of whatever PATH variables are already set. Don’t modify them. Add a semi-colon (“;”) to the end, and then type/copy-paste/whatever the exact path to the ‘bin’ subdirectory of where you installed git. For example: “C:\Program Files (x86)\Git\bin\”
Apply the changes, and CMD should now run git commands.
By the way, this procedure is what you should do to also get other commands to run directly in CMD terminal as well.