Skip to content

Instantly share code, notes, and snippets.

@tednaleid tednaleid/.gitconfig

Created Mar 10, 2017
What would you like to do?
`git pusho` command that pushes to origin and creates a clickable link to open a PR using upstream branch as merge target
# 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
You can’t perform that action at this time.