Skip to content

Instantly share code, notes, and snippets.

@todb-r7
Last active December 16, 2015 12:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save todb-r7/5438391 to your computer and use it in GitHub Desktop.
Save todb-r7/5438391 to your computer and use it in GitHub Desktop.
Git config aliases
[alias]
branch-current = rev-parse --abbrev-ref HEAD
# Usage: git-pr HISNAME HISBRANCH
# Example: git-pr rapid7 master
# Example: git-pr JoeContributor bug/his-fix-for-a-bug-that-you-fixed
pr-url =!"xdg-open https://github.com/todb-r7/metasploit-framework/pull/new/$1:$2...$(git branch-current) #"
@kernelsmith
Copy link

ultimately, just change the last line to
pr-url =!"xdg-open https://github.com/$(git config user.name)/$(basename $(git rev-parse --show-toplevel))/pull/new/$1:$2...$(git branch-current) #"

also, should the usage and examples be: git pr-url HName HBranch etc not git-pr ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment