When I work on a bigger project, I use long branch names, eg. dev/username/PROJECT-JIRANUM_some_description
.
It would be cool to be able to do sth like this:
git branch -D STH(xxxx)
Where STH() is some syntax that would use some glob-like matching of branch names (so that xxxx could be a JIRA number contained in branch name). If there is ambiguity, git would inform and abort the command.
It sth like this is possible at the moment? I could not find any information on this.
I would recommend using zsh with prezto since it gives you branch name completion as follows: ('...' appears every time I press tab for branch name completion)
If you go down this route, for reference here is the list of prezto modules I've enabled (in ~/.zpreztorc
):
# Set the Prezto modules to load (browse modules).
# The order matters.
zstyle ':prezto:load' pmodule \
'environment' \
'terminal' \
'editor' \
'history' \
'archive' \
'directory' \
'spectrum' \
'utility' \
'completion' \
'ssh' \
'git' \
'history-substring-search' \
'prompt'
I believe the important ones (for what you need) are utility, completion and git
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