After using Git for a while, you’ll eventually start looking ways to make your Git workflow more efficient. One thing that gets old pretty quick is having to type out full file, directory and branch names. Wouldn’t it be nice to have the same auto completion capability in Git that we have on our bash terminal? Of course it would! Let’s make it happen.
Install Git Bash Completion
Git auto completion is so useful that it’s available through the package manager on Fedora. To install, open a terminal and execute:
sudo yum install git bash-completion
With Git bash completion installed, navigate to the folder of one of your projects that is using Git. Type the first few letters of branch name in then press the tab key. If Git bash completion can find your target, it will finish the spelling for you. For example, if you want to checkout the master branch you could type
git checkout mas # then press tab
We hope you found this article useful. If you see any mistakes, missing features or ways to improve it, please let us know in the comments below so we can update its contents. If you're willing to link to us, we would sincerely appreciate it!