I don't want to have two versions of git on my machine that might interfere with one another. I heard the best way to install git is via homebrew. However, my mac OS comes with git pre-installed (looks like an older version though) - what do you guys recommend? don't want to pollute my system or get confused later on.
1 Answer
macOS does come with git preinstalled at /usr/bin/git (Check with /usr/bin/git --version to see that this is the by Apple provided version).
You can install another version of git with homebrew at /usr/local/bin and if you add the /usr/local/bin folder to the PATH string before /usr/bin then it will use the homebrew variant (Which is probably the more recent version). This way no confusion should arise for you I hope.
I would be careful and not delete the Apple provided git version, see also the following thread in Apple SE.
-
1