- Git config -global color.ui true git config -global user.name 'YOUR NAME' git config -global user.email 'email protected' ssh-keygen -t rsa -C 'email protected' The next step is to take the newly generated SSH key and add it to your Github account. You want to copy and paste the output of the following command and paste it here.
- More than 1 year has passed since last update. MacOS Catalina にしたらGitコマンドが動かなくなった ( #git # Mac ) Git.
Recently a vulnerability in Git was discovered that could lead to arbitrary code execution when a developer utilizes a malicious repository. The good news is that this issue has been patched and the fix is available in version 2.17.1.
Now let’s upgrade!
MacOS Catalina Patcher The easy way to run macOS Catalina on your Unsupported Mac APFS BootROM Support: Early-2008 or newer Mac Pro, iMac, or MacBook Pro: Late-2008 or newer MacBook Air or Aluminum Unibody MacBook: Early-2009 or newer Mac Mini or white MacBook: Early-2008 or newer Xserve: Machines that ARE NOT supported: 2006-2007 Mac Pros, iMacs, MacBook Pros, and Mac Minis: The 2007 iMac 7,1.
Overview
In this guide we are going to walk through how to upgrade Git via Homebrew. First we will install Homebrew and then install Git. Given that you may have Git already installed (e.g. via XCode), this guide will also walk you through how to change your path to use the official (non-Apple) distribution.
A few details before we get started:
If you are unfamiliar with Homebrew, it is a package manager for Mac that allows you to easily install and utilize a myriad a programs (i.e. formulae).
- For this guide, I am assuming you are running MacOS 10.11 or higher
- Additionally, check out the full Homebrew system requirements here before diving in
Step by Step Guide
Install Homebrew
if Homebrew is already installed, you can skip to the Git section
For installation details, including system requirements check out the documentation here
Update Homebrew to ensure you are on the latest version
Run brew doctor to ensure everything is good to go
If all is well, the output should say Your system is ready to brew.
Now let’s get to Git.
Check your current version of git
If the version of git says something like git version 2.15.1 (Apple Git-101)
then you are running the Apple version of Git, not the official distribution.
No worries, Homebrew has got us covered.
Install git via Homebrew
Change your local path to the Homebrew version
Check the git version
You should now see the current version of git, such as git version 2.17.1
.
What Is The Latest Update For Macos Catalina
To upgrade in the future, simply run
Conclusion
We are all set! Homebrew is installed, Git is installed, and we have changed our path to point to the current version. For further details on Homebrew and some additional resources, check out the links below.
Additional Resources
Update Git Mac Catalina 2019
- Updating paths for Git on StackOverflow