17 May 2014

Quick Tip: git Auto-complete

When I started using git, it peeved me that there is no auto-complete. More so when you have to manually do a git add manually.

Thank heavens I found this little gem. Making auto-complete work for git:

In terminal:
curl https://raw.github.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash

And then you'd need to "activate" it in your .bash_profile:
if [ -f ~/.git-completion.bash ]; then
  . ~/.git-completion.bash