怎样在cmd和powershell中使用git命令
发布时间:2017-04-09 04:19
相关话题
在windows系统里使用git时,我们一般在Git Bash窗口中输入命令,如果想让git命令也能在cmd和powershell中也能运行,怎么做呢?下面就让小编给大家说说怎样在cmd和powershell中使用git命令吧。
在cmd和powershell中使用git命令的方法
方法1-安装时设置
在安装git的时候把“Use git from the windows command prompt"的选择上

安装成功之后,打开cmd,输入git命令

方法2-git目录加入环境变量
安装好git,没有选择方法1中的选项,默认情况下在cmd里不能运行git命令

进入环境变量界面
(windows键+R) ->高级环境设置 -> 环境变量



选中Path项然后点击编辑

把git的安装目录C:Program Files (x86)Gitcmd加到最后,并确定。
然后到cmd里输入git命令就可以执行了

猜你感兴趣的:
1.windows怎么从命令行下载文件
2.怎样解决cmd无法进入其他盘
3.怎样处理cmd命令行失效的问题
4.怎样处理cmd命令行失效
5.win8系统cmd命令大全
6.win7系统DOS命令不能使用怎么办
怎样在cmd和powershell中使用git命令的评论条评论