我正在尝试切换到自制版本的 git,但我收到以下消息:
unknown68a86d401752:~ davidadams$ brew link git
Linking /usr/local/Cellar/git/1.8.4... Warning: Could not link git. Unlinking...
Error: Could not symlink file: /usr/local/Cellar/git/1.8.4/share/zsh/site-functions/git-completion.bash
Target /usr/local/share/zsh/site-functions/git-completion.bash already exists. You may need to delete it.
To force the link and overwrite all other conflicting files, do:
brew link --overwrite formula_name
To list all files that would be deleted:
brew link --overwrite --dry-run formula_name
我对 Homebrew 或垃圾箱知之甚少,不知道这是否是安全的建议。
我的目标是开始使用当前版本的 git。终端告诉我以下内容:
unknown68a86d401752:~ davidadams$ which git
/usr/bin/git
unknown68a86d401752:~ davidadams$ git --version
git version 1.7.7.5 (Apple Git-26)