Created
February 22, 2018 14:40
-
-
Save andycochrane/4240058039fa386b4129a498eedcaeb9 to your computer and use it in GitHub Desktop.
Alias for setting the upstream of a branch
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] | |
upstream = "!f() { \ | |
REMOTE=${1-origin}; \ | |
OUTPUT=$(echo $(git push -u $REMOTE $(git rev-parse --abbrev-ref HEAD))); \ | |
echo $OUTPUT; \ | |
}; f" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment