I am trying to edit my .gitconfig to add a shortcut that takes into account my current branch and pushes it, even if there is no upstream defined yet. To reference my current branch I would normally do:
git symbolic-ref --short HEAD
My problem is that this solution can't be used for shortcuts.
What I want to do is push the current branch and set its upstream branch. Currently I do:
git push -u origin <my-current-branch>
And I wanted to make a shortcut like:
git pu
How can I add the reference to the current branch in my .gitconfig ?
NOTE: The can be any branch I am working