我正在尝试切换到自制软件的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)
答案 0 :(得分:0)
嗯,git-completion.bash
可能无论如何都没有改变,但是因为你正在更新git
以使用更新的版本,所以获取该脚本的新版本应该没问题。