Lyrks
Lyrks
Lyrks
Cover Art

Git-getpull: Quickly find the pull request that merged your commit to master Lyrics by Andrew Warner

0

Ideally git blame would give you all the context you need to determine why some code was written. But the reality is that no team is perfectly disciplined, and sometimes you're going to run across commits with cryptic or ambiguous messages ("bugfix," anyone?).
When a git commit message doesn't provide enough context, or provides context at the wrong level (too much what, too little why), it's useful to be able to find the GitHub pull request that merged that commit. Pull requests can contain code review comments, discussion over implementation details, before/after pictures of the UI, and more. Pull requests may also have many commits associated with them, which together give a clearer sense of the intended change.
The git-getpull utility allows you to find out which pull request merged a commit into master.
Installation$ curl -o /usr/local/bin/git-getpull https://raw.github.com/a-warner/git-getpull/master/git-getpull && chmod +x /usr/local/bin/git-getpull
Usage$ git getpull 42a3817c
https://github.com/rails/rails/pull/11195
Annotated Code!Click the highlighted bits for more information.
#!/bin/sh
if [ -z "$1" ]; then
echo "Usage: git getpull <SHA>"
exit 1
elif [ -z "$(git rev-parse --git-dir 2>/dev/null)" ]; then
echo "Not in a git directory"
exit 1
else
repository_path=$(git config --get remote.origin.url 2>/dev/null | \
perl -lne 'print $1 if /(?:(?:https?:\/\/github.com\/)|:)(.*?).git/')
pull_base_url=https://github.com/$repository_path/pull
pull_id=$(git log $1..master --ancestry-path --merges --oneline 2>/dev/null \
| tail -n 1 | perl -nle 'print $1 if /#(\d+)/')
if [ -n "$pull_id" ]; then
echo "$pull_base_url/$pull_id"
else
echo "Sorry, couldn't find that pull"
exit 1
fi
fi

About “Git-getpull: Quickly find the pull request that merged your commit to master” by Andrew Warner

Read the complete lyrics to "Git-getpull: Quickly find the pull request that merged your commit to master" by Andrew Warner. On Lyrks you can follow along with the full text, explore the artist's discography, and discover related songs. The track is often categorized under Non-Music, Code.

"Git-getpull: Quickly find the pull request that merged your commit to master" is performed by Andrew Warner. This page provides the full lyric text for fans who want to sing along, study the songwriting, or compare versions across releases. Lyrks organizes lyrics by artist and song slug so you can bookmark and share a stable URL. Music lyrics help listeners connect with emotion, narrative, and rhythm in a track. Whether you are learning English, researching a favorite chorus, or preparing for karaoke, having accurate line breaks and section labels (verse, chorus, bridge) makes the experience easier. We link to the official artist profile on Lyrks where available, including biography snippets, top songs, and chart placements when we have that data. If you enjoy "Git-getpull: Quickly find the pull request that merged your commit to master", explore more songs by Andrew Warner using the links below. Chart and trending pages on Lyrks highlight what listeners are searching for this week. For copyright or correction requests, see our DMCA and contact pages.

View all songs and biography for Andrew Warner · Trending lyrics · Billboard Hot 100

Frequently asked questions

"Git-getpull: Quickly find the pull request that merged your commit to master" is credited to Andrew Warner. Songwriting credits may include additional writers listed on the release; check the credits section on this page for linked collaborators.

Album information for "Git-getpull: Quickly find the pull request that merged your commit to master" is not available in our database yet. You can still read the full lyrics on this page.

Visit the Andrew Warner artist page at /artist/andrew-warner for biography, popular tracks, and links to more lyric pages.