我应该从哪里安装git:xcode-select --install或brew install git? [英] From where should I install git: xcode-select --install or brew install git?
问题描述
我应该从哪里安装git: xcode-select --install
或 brew install git
?
如果要进行任何开发,则无论如何都要进行 xcode-select --install
.
然后您可以
酿造git
,它将在不影响Apple Xcode git
的情况下,将 git
安装到/usr/local/bin/git
中.不会有两个 running 的git版本,但是会安装两个 .键入 git
时哪个运行,将取决于您的PATH.通常,您首先要在PATH上使用/usr/local/bin
,这样您就可以从 homebrew 提供的更新程序包中受益,而不是从Apple提供的过时版本中获益.>
From where should I install git:
xcode-select --install
or brew install git
?
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.
这篇关于我应该从哪里安装git:xcode-select --install或brew install git?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!