DEV Community

Mike Bobadilla
Mike Bobadilla

Posted on • Originally published at mikebobadilla.com on

Setting up git autocomplete on mac

Mac's git doesn't come with auto complete, which is obnoxious, so I just run this is on my new systems. You don't have to do it this way and just piece it together for yourself using the git site like I did.

cd
curl -O https://github.com/git/git/blob/master/contrib/completion/git-completion.bash
echo "source ~/git-completion.bash" >> ~/.bash_profile
source ~/.bash_profile
Enter fullscreen mode Exit fullscreen mode
This is the code I run. Trust but verify ☑️

This is also stored in my current setup page

Top comments (2)

Collapse
 
igorganapolsky profile image
Igor Ganapolsky

This doesn't work. Error:

/Users/igorganapolsky/git-completion.bash:8: parse error near `\n'

Collapse
 
mikebobadilla profile image
Mike Bobadilla

oh thanks. Ill fix it