Skip to content

Instantly share code, notes, and snippets.

@briandailey
Created July 29, 2014 16:08
Show Gist options
  • Save briandailey/bdc1d1b51c5d1767208b to your computer and use it in GitHub Desktop.
Save briandailey/bdc1d1b51c5d1767208b to your computer and use it in GitHub Desktop.
gist alias to get a PR where the sha was introduced.
[alias]
pr = "!f() { git log --merges --ancestry-path --oneline $1..master | grep 'pull request' | tail -n1 | awk '{ print $5 }'; }; f"
@briandailey
Copy link
Author

usage:

git pr sha

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