Git autocompletion is a must have

By | February 8, 2023

Get git autocompletion in 2 mins. Run the following commands:

Step 1

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

Step 2

Add the following to your ~/.bash_profile file:

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

Step 3

Apply the changes:

source ~/.bash_profile

If you don’t have permission, run:

chmod +x ~/.git-completion.bash

Step 4

Test

Category: Git

Leave a Reply

Your email address will not be published. Required fields are marked *