How to view the earliest commit in a GitHub repo

The GitHub UI apparently doesn't provide a straightforward way for people to view the earliest commit in a repo. Instead you have to jump through some hoops:

  • Find the number of total commits in a repo (e.g. 1000)
  • Go to the list of commits and click the "Older" button at the bottom once
  • In the address bar, copy the url, which should look like https://github.com/ozywuli/ozywuli/commits/main?after=cbf804d0f802fa9c0242a718e14e69ea66612fe0+34&branch=main. Notice the +34 in the url. This is the number of commits to skip after the cbf804d0f802fa9c0242a718e14e69ea66612fe0 commit. So after you press the "Older" button the first time, it skips 35 commits.
  • To reach the earliest commit in a GitHub repo, just replace the 34 in the above url with the total number of commits minus number of commits to display minus the single offset. In orther words, the formula would be:
    (# total commits - number of commits to display - single offset)

Reference

How to navigate to the earliest commit in a repository?
In GitHub, is there an easy way to navigate to the earliest commit of a large open source project? The project has over 13,000 commits as of today. I don’t want to have to press the “Older” butto...

Subscribe to Ozy Wu-Li

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe