我买了一台新的MacBook Pro并按顺序安装了下面的应用程序列表.在我的旧MacBook上,也运行OS X 10.6.6,但我没有/usr/bin/git在新款MacBook Pro上运行.我能想到的两个系统之间的唯一区别是:
自制软件安装git 1.7.4.1 /usr/local/Cellar/git并将其符号化/usr/local/bin.这让我相信Xcode 4安装了git1.7.3.4 /usr/bin.任何人都可以确认或否认这个吗?
如果Xcode 4没有安装git 1.7.3.4 /usr/bin,那么有什么想法程序呢?
ruby -e "$(curl -fsSLk https://gist.github.com/raw/323731/install_homebrew.rb)"brew install gitbrew install …我在我的Mac上安装了Git,但我不知道如何运行它或访问它.从终端我输入git,但它说"命令无效".
我从http://code.google.com/p/git-osx-installer/downloads/list?can=3下载了git, 然后我下载了"Git Installer 1.7.3.5 - OS X - Leopard - x86_64"软件包.
包的内容如下:
当我执行"setup git PATH for non-terminal programs.sh"时,我收到以下消息:
在〜/ .MacOSX/environment.plist中没有改变PATH
~/Volumes/Git 1.7.3.5 x86_64 Leopard/Volumes/Git 1.7.3.5 x86_64 Leopard -MacBook-Pro:Git 1.7.3.5 x86_64 Leopard $ $ PATH -bash:/ usr/local/bin:/ bin:/ sbin:/ usr/bin:/ usr/sbin:/ usr/libexec:没有这样的文件或目录
我的个人资料文件的内容如下:
# System-wide .profile for sh(1)
if [ -x /usr/libexec/path_helper ]; then
eval `/usr/libexec/path_helper -s`
fi
if [ "${BASH-no}" != "no" ]; then
[ -r /etc/bashrc ] && . …Run Code Online (Sandbox Code Playgroud) 我以前安装过Git(1.9.3),我想将它升级到最新版本(2.0.1).我首先运行uninstall.sh然后再运行git.pkg来卸载以前的安装.但是,当我跑步时git --version,它仍然显示我git version 1.9.3 (Apple Git-50).
所以我这样做了:
$ which git
/usr/bin/git
$ echo $PATH
...:/usr/local/git/bin
Run Code Online (Sandbox Code Playgroud)
显然,/ usr/local/git/bin中的Git是我想要的最新版本.
那么如何删除旧版本的路径并告诉Mac OSX在哪里找到合适的版本?
谢谢!