Created
August 27, 2015 23:09
-
-
Save ekilah/88a880c84a50b73bd306 to your computer and use it in GitHub Desktop.
Git alias to push current branch to upstream branch of the same name
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
pushup = "!gitbranchname() { git symbolic-ref --short HEAD; }; gitpushupstream() { git push --set-upstream origin `gitbranchname`; }; gitpushupstream" |
just a note to self (this is easier to even remember)
[alias]
pushup = "!git push --set-upstream origin $(git symbolic-ref --short HEAD)"
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
late reply, but no problem! glad it helped