I would like to use the shell variable extension inside the git alias to remove the branch prefix. Unfortunately, when I use the "standard" alias, the variable extension does not execute:
publish = push -u origin ${$(git symbolic-ref HEAD)
This is trying to actually push a branch named "$ {$ (git"). But if I changed the alias to:
publish = "!git push -u origin ${$(git symbolic-ref HEAD)##refs/heads/}"
it starts via sh and does not perform the required replacement. Is there a workaround?
source share