6

On GitHub, I can see the history of commits of a file under .../commits/master/filename. What I want to know is, assuming these changes were merged into master via Pull Requests, what Pull Request did the change come from? Is there an easy way to do that?

Old Pro
  • 24,624
  • 7
  • 58
  • 106

1 Answers1

0

Since Oct. 13, 2014, this should be easier:

Linking merged pull requests from commits

We've been including the containing branches and tags on commit pages to give you more context around changes. Now, commits in a repository's default branch will also show you the pull request that introduced them.

commit with PR reference in it!

In the pull request, you can see the discussion around why the commit was introduced, and get a clearer picture of the reason for the change.

As always, if you know the commit SHA, you can skip the commit page and search for the pull request directly.


For instance:

You can see for the file hakimel/reveal.js/plugin/markdown/markdown.js, my contribution now comes with a reference to the PR #734 it originated.

PR from contrib


Note however that:

will include the reference to the PR...

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250