Β· 1 min read
Autocomplete branch names on the command line
Trying to get over the force of habit that is using tab to auto-complete things on Mac. Well, it doesnβt work for git out of the box but here is a way to get it working on the command line. You can use this script as part of your bash_profile
in order to be able to auto-complete long branch names by pressing tab
.
First, download the script to your home folder:
Next, you need to edit your ~/.bash_profile
and add the following:
if [ -f ~/.git-completion.bash ]; then
. ~/.git-completion.bash
fi