Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
谁能解释一下? which git好像在撒谎……
which git
$ which git /usr/local/bin/git $ /usr/local/bin/git --version git version 1.7.9.2 $ git --version git version 1.7.10.4
尝试git使用以下命令从用于路径查找的 bash 哈希表中刷新:
git
hash -d git
然后再试一次。
参考文章:
如果您使用bashthentype -a是一个更好的选择,因为它还显示别名,不像which.
bash
type -a
which