Activating Git Autocompletion

Git by default dont provide autocompletion,sometime its really seems boring to write the whole branch name or command.

Couple of days ago Rubayeet shared the way to activate it.

Go to this link ,copy the content of the file and save it as .git-completion.sh and add the path of the file to your bash profile.

like this

source ~/.git-completion.sh

And compile the bash profile by using following command:

source ~/.bash_profile

Write any git command and then press tab(like unix autocomplete)

you will see the branch name or command is automatically completing or showing suggestion like below

Happy coding 🙂

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s