- Go to Control Panel\System and Security\System
- Click on Advanced System Settings on the left which opens System Properties.
- Click on the Advanced Tab
- Click on the Environment Variables button at the bottom of the dialog box.
- Edit the System Variable called PATH.
- Append these two paths to the list of existing paths already present in the system variable. The tricky part was two paths were required. These paths may vary for your PC.
;C:\msysgit\bin\;C:\msysgit\mingw\bin\
- Close the CMD prompt window if it is open already. CMD needs to restart to get the updated Path variable.
- Try typing git in the command line, you should see a list of the git commands scroll down the screen.
Font:http://stackoverflow.com/questions/11000869/command-line-git-on-windows