Two versions of git installed, currently using old one, how do I switch?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-06 11:23:23

问题


I need some help, I had a version of git installed a while back (not sure how) not using homebrew. I just installed with homebrew and I'm not sure how to use the new one instead of the old one. Ideas? Thanks in advance

$ which -a git
/usr/local/bin/git
/usr/bin/git
/usr/local/bin/git

$ which git
/usr/local/bin/git

$ /usr/bin/git --version
git version 1.7.5.4

$ /usr/local/bin/git --version
git version 1.8.4

$ git --version
git version 1.7.5.4

回答1:


export PATH=/usr/local/bin:$PATH


来源:https://stackoverflow.com/questions/19231747/two-versions-of-git-installed-currently-using-old-one-how-do-i-switch

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