Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Time of creation of a Github Fork

For doing some research on my Github fork , I need to know the exact time it was created. Anyway to do so? Maybe some metadata somewhere?

like image 873
nikel Avatar asked Jul 15 '13 07:07

nikel


People also ask

When should a fork be repossessed?

Most commonly, forks are used to either propose changes to someone else's project to which you do not have write access, or to use someone else's project as a starting point for your own idea. You can fork a repository to create a copy of the repository and make changes without affecting the upstream repository.

Is forking the same as creating a new branch?

Fork is another way of saying clone or copy. The term fork (in programming) derives from a Unix system call that creates a copy of an existing process. So, unlike a branch, a fork is independent from the original repository. If the original repository is deleted, the fork remains.

Does fork retain history?

Yes. If the original repository gets deleted, then the fork keeps all its commits, including the past commits. However, you will loose the line saying Forked from <User name>/<repository name> , i.e. there will be no more link to the original, now deleted, repository on GitHub.


1 Answers

You could use the GitHub Repos API, it does contain the creation date:

  GET /users/:user/repos

    ...
    "pushed_at": "2011-01-26T19:06:43Z",
    "created_at": "2011-01-26T19:01:12Z",   <====
    "updated_at": "2011-01-26T19:14:43Z"
  }

More precisely, using jq for JSON filtering, to get creation date of my old GitHub repository VonC/b2d:

VonC@vonc MINGW64 /c/Users/vonc/git
$ curl https://api.github.com/users/VonC/repos | jq '.[] | select(.name=="b2d") | .created_at'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  153k  100  153k    0     0   105k      0  0:00:01  0:00:01 --:--:--  105k
"2015-03-28T19:58:35Z"
like image 69
VonC Avatar answered Sep 22 '22 11:09

VonC