I'd like to create an alias that runs git pull origin <current branch name>
I can get the current branch name with git rev-parse --abbrev-ref HEAD
.
But how do I put that 2nd command within the first in a bash alias?
I've tried
alias gup="git pull origin `git rev-parse --abbrev-ref HEAD`"
and
alias gup="git pull origin $(git rev-parse --abbrev-ref HEAD)"
but both result in the initial branch name in the alias, not the branch name at the time the command is run.