Command-line Git on Windows

前端 未结 9 1951
悲&欢浪女
悲&欢浪女 2020-12-07 09:44

I have installed msysGit 1.7.10 on my Windows 7 machine. What I need to know is if I can still use Git from command line?

When I try the git command in

9条回答
  •  执笔经年
    2020-12-07 10:26

    These instructions worked for a Windows 8 with a msysgit/TortoiseGit installation, but should be applicable for other types of git installations on Windows.

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

提交回复
热议问题