I'm trying to make an alias for adding my changes, and committing them after. The commit message must be prefixed with the branch name. The message should look something like:
"[BRANCH-123] Message here"
My branches are prefixed with a subtree like 'bugfix/' or 'feature/', and I want those to be removed from the message. So far I have:
branch-name = "!git rev-parse --abbrev-ref HEAD"
something = "!f() { git add -A && git commit -m \"[${$(git branch-name)#*/}] $1\"; }; f"
However, the 'something' command says 'Bad substitution'.