Is there a command I can use where I can say git checkout branch_na*
and it would autocomplete and checkout that branch?
I don't know of a way to use wildcards like *
in that context. However, there is a Git bash autocomplete script where you can press <Tab>
to autocomplete partially typed branch names at the shell prompt.
I was just wondering if git support wildcards
Using it as you mention would rely on the bash (which does not know anything about branches)
So you need to rely on other means to other mean, like:
git checkout $(git for-each-ref --format='%(refname:short)' refs/heads/branch_na.*|head)
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