Skip to content

Instantly share code, notes, and snippets.

@wilrnh
Created October 17, 2016 20:45
Show Gist options
  • Save wilrnh/1354cb34663bf5b0ec3f5f863c68beea to your computer and use it in GitHub Desktop.
Save wilrnh/1354cb34663bf5b0ec3f5f863c68beea to your computer and use it in GitHub Desktop.
Get the branch name from a git merge commit
git log --format=%s -n1 | sed -n -e 's/^Merge pull request .* from wilrnh\///p'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment