git - setting path variable

扶醉桌前 提交于 2019-12-07 06:04:29

问题


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.


回答1:


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


来源:https://stackoverflow.com/questions/7488329/git-setting-path-variable

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!