A very easy solution.
- Press command + shift + b to bring up the Bookmarks bar if using chrome
- Go here
- Drop and drag the word 'OLDEST' into the bookmarks bar
- Go to any GitHub repo, and click 'OLDEST' in your bookmarks bar
- It will automatically go to the oldest commit!
Source: thanks to @bpc333 for the awesome tool that makes it possible.
OR
Navigate to the commits page of a GitHub repo
Change 'main' in the code below to whatever the name of the branch is
(function(){(([_, repo, branch='main']) => {fetch(`https://github.com/${repo}/tree/${branch}`).then(res => res.text()).then(res => {let mainDocument = new DOMParser().parseFromString(res, 'text/html');let commitCount = mainDocument.evaluate('//span[@class="d-none d-sm-inline"]//strong', mainDocument.body).iterateNext().innerText;commitCount = Number(commitCount.trim().replaceAll(',', ''));let commitId = mainDocument.evaluate('//*[@class="f6 Link--secondary text-mono ml-2 d-none d-lg-inline"]', mainDocument.body).iterateNext().getAttribute("href").split('/').pop();let url = `https://github.com/${repo}/commits/${branch}?after=${commitId}+${commitCount-10}`;window.location = url;})})(window.location.pathname.match(/\/([^\/]+\/[^\/]+)(?:\/(?:tree|commits|blob)\/([^\/]+))?/))})()
Open the JS console with command + shift + j and paste it in and hit enter, it will navigate to the first commit on that branch.
This second method uses the same code as the first one, but without the bookmark.