Ken Y-N
Ken Y-N

Reputation: 15018

How to find the original (or oldest) version of a file on GitHub?

Given a file in a repository that might have been forked many a time, how would I go about searching for where it originally came from by searching the whole of GitHub, not just the current repository?

Specifically, I am looking at this file and would like to know where it originated as I want to track down the licence. I can perform this global search from the top page of https://github.com:

filename:featurepyramid.cpp fork:false

This returns 219 results, and there is no option to sort by "Earliest check-in date", which would at least get me some of the way to the answer. How can I get GitHub to help me narrow down my search?

Upvotes: 3

Views: 391

Answers (1)

osowskit
osowskit

Reputation: 6344

You can view the history for a file directly through the link you posted (see attached image) or using git itself. Here is the documentation for looking at file history.

enter image description here

The History link leads to this page

And the first commit is fbfccff

Upvotes: 3

Related Questions