将Git更新到最新版本(mac)

时间:2011-01-27 19:58:55

标签: git macos

我正在运行Git版本1.6.5.1。二进制文件位于/ usr / local / git / bin中。有没有简单的方法来更新到最新版本?

5 个答案:

答案 0 :(得分:22)

我最后只是安装了自制软件。

答案 1 :(得分:7)

来自Git README文件:

  

改质

     

只需下载最新的Git安装程序,运行提供的uninstall.sh脚本,然后正常安装。

Download and install from Git's website

答案 2 :(得分:5)

到目前为止我发现的最简单的方法是来自git官方网站。

http://git-scm.com/book/en/Getting-Started-Installing-Git

  

另一个主要方法是通过MacPorts安装Git   (http://www.macports.org)。如果您安装了MacPorts,请安装Git   通过

     

$ sudo port install git-core + svn + doc + bash_completion + gitweb

答案 3 :(得分:2)

检查Dan Benjamin博客。只需更新git-1.6.4.2即可获得最新版本。

答案 4 :(得分:0)

我发现最简单的选择是直接从Git的网站下载:

http://git-scm.com/downloads

从那里,我运行他们的安装包,退出并重新启动终端,并检查:

git --version

已更新!

对于它的价值,我的which git读取:

/usr/local/git/bin/git

我的.bash_profile

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

相关问题