As described in the post here all git versions below
2.7.1 are vulnerable for Remote code execution under CVE-2016-2324 and CVE-2016-2315.
Check for git version
$ git --version git version 2.6.4 (Apple Git-63)
Fix for this would be to update your git version.
Upgrade Git version
For users who has Git installed via Homebrew can update git version with command
$ brew upgrade git
For users who have not installed git through Homebrew would not be able to upgrade it via above command.
They should first install git via Homebrew as given below.
$ brew install git
PATH variable to use latest git version.
Check Git version.
$ git --version git version 2.8.1
Hurray ! You are safe now 🙂