From where should I install git: xcode-select --install or brew install git?

陌路散爱 提交于 2021-01-21 10:29:06

问题


From where should I install git: xcode-select --install or brew install git?


回答1:


You need to do xcode-select --install anyway if you want to do any development.

You can then do

brew install git

and it will install git into /usr/local/bin/git without affecting the Apple Xcode git. There will not be two git versions running, but there will be two installed. Which one runs when you type git will depend on your PATH. In general, you would want /usr/local/bin first on your PATH so you benefit from the newer packages provided by homebrew rather than the outdated versions Apple supplies.




回答2:


I'd advise downloading with homebrew. You'll benefit from the frequent updates which will give you access to newer features and more stability.

It's nice that Apple decided to give users an easy way to download programming tools, but they are very out dated.



来源:https://stackoverflow.com/questions/44989618/from-where-should-i-install-git-xcode-select-install-or-brew-install-git

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!