When I want to check a branch to checkout to and I don't remember the exact name, I can't use Tab-completion, as the pool it uses is the branch pool of remote.
How can I make the Tab only look at the git branch pool (i.e. only choose from the local branches I created / already checkedout)
To see all local and remote branches, run this command: git branch -a.
One way is to modify the standard code completion script for git checkout
, example (& credit) below:
https://gist.github.com/mmrko/b3ec6da9bea172cdb6bd83bdf95ee817
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With