Find a commit on GitHub given the commit hash

前端 未结 3 1491
时光说笑
时光说笑 2020-12-22 17:08

I am fairly new to Github and have come across an amateur-ish problem.

I have been asked to do a code review and have been provided with a commit hash, however I hav

3条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-22 17:53

    The ability to search commits has recently been added to GitHub.

    To search for a hash, just enter at least the first 7 characters in the search box. Then on the results page, click the "Commits" tab to see matching commits (but only on the default branch, usually master), or the "Issues" tab to see pull requests containing the commit.

    To be more explicit you can add the hash: prefix to the search, but it's not really necessary.

    There is also a REST API (at the time of writing it is still in preview).

提交回复
热议问题