carrotcake carrotcake - 10 days ago 6
Git Question

How to install Git 2.11 from Source on mac

I've tried to install the newest version of git from the source but with no success. My current version is 2.10 and I installed it with

sudo port install git


What I've been trying so far:

git clone https://github.com/git/git


into my Documents folder. Then:

make prefix=/usr profile
make prefix=/usr PROFILE=BUILD install


That's an error I get:

ld: library not found for -lgcov
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [git-credential-store] Error 1
make: *** [profile] Error 2


But there's no errors when I use:

make
make install


But I recon there's more to it than jus simply going
make
and
make install

Answer

first uninstall your Git then

use homebrew to install the latest version of Git

brew update
brew install git

restart your terminal

;) Congrats you have the latest Git version