244

How can I find the created date of a project on GitHub?

Basically, I have to find the first commit to see the created date, however, some projects have 500 commits, which wastes a lot of time trying to get to the first commit page.

Is there a quicker way to get the created date?

TylerH
  • 20,799
  • 66
  • 75
  • 101
lvarayut
  • 13,963
  • 17
  • 63
  • 87
  • 1
    Does this answer your question? [Is there a easy way on GitHub.com to find a repositories creation date?](https://stackoverflow.com/questions/23157557/is-there-a-easy-way-on-github-com-to-find-a-repositories-creation-date) – Oliver Sieweke Apr 04 '20 at 11:29

11 Answers11

293

How can I find the created date of a project on GitHub?

Use the Repos GitHub API to retrieve this information

  • Syntax: https://api.github.com/repos/{:owner}/{:repository}
  • Example: https://api.github.com/repos/libgit2/libgit2sharp

The JSON payload will expose a created_at member with the UTC date the repository was created.

Considering the LibGit2Sharp repository above, one can see that it's been created on Feb, 2nd 2011 at 16:44:49 UTC.

Note: The created_at won't necessarily reflect the date of the first commit. It's the date the repository has been created on GitHub. For instance, the xunit/resharper-xunit project was recently moved from codeplex to GitHub. The created_at date is 2014-05-01T11:17:56Z, but the most of the commits date back much more farther than that.

TylerH
  • 20,799
  • 66
  • 75
  • 101
nulltoken
  • 64,429
  • 20
  • 138
  • 130
  • 9
    This is for a public repo, right? Any idea about private? – kraftydevil Jul 28 '16 at 18:19
  • 1
    This worked on a live repo and also on a recently dead one too. – Joe Jan 23 '18 at 04:45
  • 1
    @kraftydevil Check this for private repositories. https://stackoverflow.com/questions/23611669/how-to-see-a-created-date-of-a-repository-project-on-github/#49097550 – vicke4 Mar 04 '18 at 16:29
  • 23
    Handy cURL one-liner `curl -s https://api.github.com/repos/KhronosGroup/WebGL | grep 'created_at' | cut -d: -f2-`. Prints `"2016-03-11T02:02:33Z",` :) – legends2k Jun 11 '18 at 23:49
  • 1
    @legends or someone else, suggestions for converting to human readable timestamps? – jasonleonhard Sep 12 '19 at 21:29
  • 1
    @jasonleonhard Looks like [it is in ISO 8601 time format](https://stackoverflow.com/q/29281935/183120); the `Z` means it's in UTC0 time zone and `T` is just a separator. Perhaps you can do the conversion yourself? – legends2k Sep 13 '19 at 07:51
  • 1
    @legends2k Thanks for the response. Just curious if there is some cli tool to convert it to human readable or perhaps an api flag. – jasonleonhard Sep 13 '19 at 18:00
52

If you are not interested in the exact creation date, and just would like to know how old a repo roughly is. You can go to Insights, then Contributors. For example, first commit for react was pushed on May 26 2013.

zachguo
  • 6,200
  • 5
  • 30
  • 31
41

@nulltoken's answer is very useful. To make it even more convenient, I decided to create a chrome extension for displaying a date of creation of a repository.

Highlights

  • Beautiful calendar icon in the summary bar on a repository page
  • Customizable date format followed Moment format pattern
  • Best performance by storing all fetched URIs in the Storage

Date of creation of a repository is displaying on the summary bar:

landpage

Date format is customizable by clicking at the extension icon:

option

This's working really well for me. I hope it's useful for you as well.

lvarayut
  • 13,963
  • 17
  • 63
  • 87
32

I've written a bookmarklet for this, It may come in handy. You can even know the details of private or private - organization repositories with a simple workaround.

GitHub repository size, creation date bookmarklet | Source Code

enter image description here

vicke4
  • 2,973
  • 1
  • 20
  • 20
23

Syntax:

curl -s https://api.github.com/repos/{:owner}/{:repository} | jq '.created_at'

Example:

curl -s https://api.github.com/repos/NabiKAZ/video2gif | jq '.created_at'

Result:

"2017-04-22T22:58:47Z"
Nabi K.A.Z.
  • 9,887
  • 6
  • 59
  • 81
  • 1
    This worked on a live repo, but not on a recently dead one. @nulltoken's answer worked on both. Not a criticism - just info. – Joe Jan 23 '18 at 04:49
  • 4
    For private repos, just pass in your github username with the curl command `-u {:username}`. You'll be prompted for your password. – peter Apr 22 '19 at 18:40
  • If you do not have `jq` command then use `grep '.created_at'` instead. – Péter Szilvási Jul 05 '23 at 08:55
  • @PéterSzilvási yes, but that return `"created_at": "2017-04-22T22:58:47Z",` no only date. – Nabi K.A.Z. Jul 07 '23 at 04:20
  • You can extract the date using the `cut` command: `echo '"created_at": "2017-04-22T22:58:47Z",' | cut -d "\"" -f 4`. At this point, I would prefer the `jq` command over `grep` plus `cut` command, since it is more readable. – Péter Szilvási Jul 09 '23 at 05:50
16

You can also use Github's new GraphQL API:

query { 
  repository(owner: "graphql", name: "graphql-js") {
    name
    createdAt
  }
}
rocky
  • 1,037
  • 1
  • 11
  • 19
5

Here's the answer without external plugins:

  • Click on your Profile (top right) and select Settings
  • In your Settings page, Click the Security log option in the Sidebar.
  • You should able to see all your repositories on the right
  • Hover on the date displayed to show the full date and time in a tooltip.
TylerH
  • 20,799
  • 66
  • 75
  • 101
Dexter
  • 7,911
  • 4
  • 41
  • 40
2

I created a user script that shows the creation date directly on the GitHub page of the repo: https://openuserjs.org/scripts/cosenal/GitHub_Repo_Dates

Alessandro Cosentino
  • 2,268
  • 1
  • 21
  • 30
1

I've written a bash function for this.

# get github repo created time
ghage(){
  gh_url=${1:?usage: ghage https://github.com/owner/repo}
  owner_and_repo="$(echo "${gh_url}" | cut -d "/" -f4-5)"
  created_time=$(curl -s "https://api.github.com/repos/${owner_and_repo}" | jq -r '.created_at')
  echo "${created_time}"
}

Example:

$ ▶ ghage https://github.com/torvalds/linux
2011-09-04T22:48:12Z

Credit to nulltoken for the API info.

Amir
  • 2,082
  • 4
  • 22
  • 28
0

In case you want a C# version, you can run a unit test I wrote:

https://github.com/nilnul/nilnul.fs.git.TEST/blob/nilnul-pub/svr_/github/client/repo/vw/UnitTest1.cs

As the comment therein goes, you need to set your token in Windows Credential Manager, and also you need to create a dir named your username in the designated place. (For a pub repo, we shall not push your personal info.)

NilNul
  • 19
  • 5
-1

Just look for the most likely files that would be created when the repo is initially setup such as gitignore or README.md. Then check their history. Normally these files will not have a lot of commits and you can easily check the commit history on those to find the oldest commit.

Johann
  • 27,536
  • 39
  • 165
  • 279