Created
March 10, 2017 18:26
-
-
Save tednaleid/0543061f6023698de11a023c8db2c558 to your computer and use it in GitHub Desktop.
`git pusho` command that pushes to origin and creates a clickable link to open a PR using upstream branch as merge target
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] | |
# clickable http link to github repo | |
repourl=!"echo https://$(git remote get-url --push origin | sed 's/git\\@\\(.*\\)\\.git/\\1/' | sed 's/:/\\//')" | |
# push out a feature branch with a clickable link for creating a pull request against your upstream origin branch | |
pusho = !git push origin $(git branchname) && echo "create a pull request at: $(git repourl)/compare/$(git rev-parse --abbrev-ref --symbolic-full-name @{upstream} | awk -F'/' '{print $NF}')...$(git branchname)?expand=1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment