Site icon Ryadel

How to check the first commit date of any Git repository

How to check the first commit date of any Git repository

Have you ever needed to quickly check the first commit date of a Git repository? There are at least three ways to do that: using the GitHub website, using the Git command-line interface and using the Git-First Chrome extension. In this post, we'll briefly review these three methods and also find which is the most practical one to suit our needs.

#1. GitHub website

From the GitHub repository main page, click on the Insights tab of the repository, then navigate to the Network sub-tab on the left menu bar and wait for the "Loading graph data" message to disappear.

When the page is fully loaded, press Shift + Left Arrow to go all the way to the first commit, then click on the "dot" that represents the first commit to open it: the date you're looking for will be clearly visible near the top-right part of the page.

How to check the first commit date of any Git repository

This method is useful enough, yet it has two caveats:

  • it might not work if the repository has too many forks because the Insights/Network tab currently supports up to 100 forks;
  • it can be extremely slow if the repository features a lot of commits, branches, tags and/or forks: for example, the Network tab of the microsoft/vscode repository (Visual Studio Code), with hundreds of commits, branches, tags, and forks, takes more than 2 minutes to have its graph data loaded.

#2. GitHub CLI

Alternatively, you can clone the repository to your local machine and then run the following command from the console terminal prompt:

This Git CLI command will show all the repository's commits in reverse order (oldest commit first).

This method can be great if you already have the updated repository cloned on your local disk, but it's definitely unpractical otherwise.

#3. Git-First Chrome extension

Last but not least comes the Git-First Chrome extension, developed by Kamran Ahmed and precisely aimed to take you to first commit of any GitHub repository in the fastest possible way.

The extension adds a context menu item called "Initial Commit", which is only shown whenever you are on a repository page: by clicking this button, the extension will take you to the first commit page of the current repository.

Alternatively, the extension can be activated by clicking on the Git-First icon within the top-right part of the Google Chrome screen, together with the other extensions' icons.

IMPORTANT: this blog is completely unrelated to the Git-First project and didn't receive anything from it. The content of this article represents only the free opinion of the author.

Conclusion

In our opinion, the Git-First Google Chrome extension is the fastest and therefore the most practical way to check for a GitHub's repository first commit date, therefore we highly recommend it - especially if you need to check multiple repos and/or you frequently need to retrieve this kind of information.

That's it for now: happy commit!

 

Exit mobile version