- Learn WebAssembly
- Mike Rourke
- 124字
- 2021-08-13 15:38:57
Installing Git on macOS
Git is probably already available if you're using macOS. macOS comes bundled with Apple Git, which will probably be a few versions behind the most recent version. For the purposes of this book, the version you already have installed should be sufficient. If you wish to upgrade, you can install the most recent version of Git using Homebrew by running the following commands in Terminal:
# Install Git to the Homebrew installation folder (/usr/local/bin/git):
brew install git
# Ensure the default Git is pointing to the Homebrew installation:
sudo mv /usr/bin/git /usr/bin/git-apple
If you run this command, you should see /usr/local/bin/git:
which git
You can check to ensure that the installation was successful by running this command:
git --version