git - 设置路径变量 [英] git - setting path variable

查看:145
本文介绍了git - 设置路径变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



当我运行了几个git-tfs命令后,它恢复了原来的状态回到原始设置。



是否可以解释原因?

$ PATH = $ PATH:我的git-tfs路径在这里



为了说明起见,它首先起作用。但是,然后git-tfs命令停止工作,这是因为它所在的文件夹不再出现在路径中。



编辑:当我关闭bash时,更改不是保存。

解决方案

将它添加到 .bash_profile 中,保存。因此,内容将如下所示:

  PATH = $ PATH:我的git-tfs路径在这里
export PATH


When I run the following command to change my path variable in the git bash - it works.

After I've run a few git-tfs commands it reverts back to the original setup.

Is it possible to explain why?

$ PATH=$PATH:my git-tfs path goes here

To clarify, it works at first. But then the git-tfs commands stop working and it's because the folder it lives in no longer appears in the path.

EDIT: When I close the bash the changes are not saved.

解决方案

Add it your .bash_profile so that it will be saved. So the contents will be something like:

PATH=$PATH:my git-tfs path goes here
export PATH

这篇关于git - 设置路径变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆