用下载的最新1.8.3替换Xcode的git(Replace Xcode's git with downloaded latest 1.8.3)

编程入门 行业动态 更新时间:2024-10-21 11:26:28
用下载的最新1.8.3替换Xcode的git(Replace Xcode's git with downloaded latest 1.8.3)

我想使用最新版本的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:$PATH

Edit ~/.bash_profile and add

alias git=/usr/local/bin/git

Source 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

更多推荐

本文发布于:2023-07-16 12:44:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1128589.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:最新   Xcode   git   downloaded   Replace

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!