Git Auto-Completion

If you are finding a way to autocomplete ur Git commands or branch names with a tab, there is a simple way.

Firstly, download the .git-completion.bash

curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash

Secondly, add the follow lines to your .bashrc

if [ -f ~/.git-completion.bash ]; then
  . ~/.git-completion.bash
fi

Enjoy yourself.

References

comments powered by Disqus