git config --global alias.unstage 'reset HEAD --'
git config --global alias.last 'log -1 HEAD'
git config alias.switch '!git stash && git fetch && git checkout $1 && git stash pop && echo'
I use echo
here to avoid the 'branch' is not a stash reference
error, since it seems alias appends the branch at the end of the command regardless that it is consumed by $1