I'd like to use a shell variable expansion inside of a git alias to strip a prefix of a branch. Unfortunately when I use the "standard" alias, variable expansion is not done:
publish = push -u origin ${$(git symbolic-ref HEAD)##refs/heads/}
This is trying to actually push a branch called "${$(git". But if I change the alias to:
publish = "!git push -u origin ${$(git symbolic-ref HEAD)##refs/heads/}"
it's run via sh and fails to do the substitution I want. Is there some workaround?