我想使用最新版本的git( 1.8.3 )。
目前,当我制作git --version它向我展示了git version 1.7.12.4 (Apple Git-37) ,它与Xcode一起安装。
我安装了最新版本,但仍然使用Xcode一..
请教我如何覆盖安装到usr/local/bin的路径的xcode git?
谢谢!
I want to use latest version of git (1.8.3).
Currently when I make git --version it shows me git version 1.7.12.4 (Apple Git-37) which was installed together with Xcode I suppose.
I installed newest version but still bash uses Xcode one..
Please advice me how to override xcode git with the path that is installed to usr/local/bin?
Thanks!
最满意答案
编辑〜/ .bash_profile并添加
alias git=/usr/local/bin/git输入bash_profile文件或重新启动bash(source〜/ .bash_profile)
看看git --version打印什么。 我不确定这是否影响XCode。 我从不在IDE中使用版本控制工具,我从命令行执行
或者你将/ usr / local / bin添加到$ PATH到你的bash_profile。 我用macports做这个或者更好地说macports会自动改变你的bash_profile。
export PATH=/usr/local/bin:$PATHEdit ~/.bash_profile and add
alias git=/usr/local/bin/gitSource the bash_profile file or restart bash (source ~/.bash_profile)
See what git --version prints. I am not sure if this affects XCode. I never use versioning tools in IDEs, I do it from the command line
Or you add /usr/local/bin to $PATH to your bash_profile. I do this with macports or better said macports alters your bash_profile automatically.
export PATH=/usr/local/bin:$PATH更多推荐
发布评论