Created
July 11, 2013 19:09
-
-
Save cddr/5978313 to your computer and use it in GitHub Desktop.
Find the first few branches that contain the specified commit
This file contains hidden or 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
# Find the pull request that introduced a given commit | |
COMMIT=c78f9ef # just an example commit id | |
# This will list the first few branches that contain this commit (including only "pull request" branches) | |
git branch -r --contains $COMMIT |grep "origin/pr" |sort |head |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Don't forget, you can use the
:/words
syntax to find a commit by commit message. E.g.,