I’m working on a project which requires me to create a number of Git branches with identical starting components (something like x/y/z/). This slows down tab completion a lot, since there are remotes on this project for other people working on it that have similar but distinct starting components. Is there a way to create a git alias which would automatically prepend my particular branch start to git checkouts?
I tried the very straightforward option (git config –global alias.precheckout “checkout x/y/z/”), but unsurprisingly this failed, as it resulted in a space between x/y/z/ and the name of the branch I actually want to checkout.
LemonCoffeeCake is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.