I am trying to enable autocomplete for git on my mac (currently running El Capitan) but I am having troubles with Homebrew.

So far, I have installed bash-completion and added the lines in my bash_profile, as seen in this post The problem comes when doing brew install git (although there must be another git installed in my machine sin I have used it).

After reinstalling brew, I get that git is installed but it's not link:

Warning: git-2.7.3 already installed, it's just not linked

I try using the command brew link git and I get this:

Linking /usr/local/Cellar/git/2.7.3... 
Error: Could not symlink share/git-core/contrib
/usr/local/share/git-core is not writable.

Have anybody faced this situation before? How can I link git and what's exactly the "linking" problem?

  • Please post the output of: ls -Old /usr/local The problem might be that SIP (System Integrity Protection) made /usr/local read only...
    – Motsel
    Mar 14, 2016 at 21:46
  • also check with "brew doctor" if it reports any errors.
    – Motsel
    Mar 14, 2016 at 22:03

1 Answer 1


I used brew doctor to see what's was happening.. It seems like there were some broken links.

The solution: I unlinked them, then I was able to run brew link git successfully. And now auto-completion works fine

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .