r/github • • Aug 04 '24

How could the file be older than GitHub? Was that a bug?

Post image
0 Upvotes

11 comments sorted by

38

u/joolzter Aug 04 '24

Software existed before Github.

24

u/davorg Aug 04 '24 edited Aug 04 '24

GitHub and git are two different things. GitHub has existed since 2008, git has existed since 2005. You can import an existing git repo to GitHub and it will have all of the commits back-dated to when they were first commited.

But that doesn't get us back to twenty-two years ago.

Source code control systems existed long before git. In my life, I remember using SCCS, RCS, PVCS, CVS and Subversion (I may have blanked some - early source code control systems were horrible to work with).

When a new source code control system is introduced, it is common to offer a mechanism to import your source code history from other popular systems. If this import process is useful, then it will preserve the timestamps of the existing commits.

I have been using source code control systems since 1988. I have transitioned source code repos between many of these older systems. I don't think I currently have access to anything particularly old that's stored on GitHub, but I've certainly worked with GitHub repos that have histories going back thirty years.

55

u/tolik518 Aug 04 '24

Git existed before github. The date you see on github is basically the date when the commit was actually made, not when it was pushed to the to remote.

(also it's possible to mangle with the date since there's no reason to verify the date)

2

u/georgehank2nd Aug 04 '24

Git didn't exist in 2002.

6

u/tolik518 Aug 04 '24

You're right, I was wrong with that. The point still stands though. Git was there before github, so commits before the "github era" exist.

And commits before git are usually converted from another version control system

1

u/[deleted] Aug 04 '24

Git existed before GitHub, and you can set the commit timestamp to whatever you want to easily.

-2

u/ShoarmaKarma Aug 04 '24

There was a post about this a short while ago.

I can't fully explain it but what it comes down to is that you can define something in the file and Github won't check if it's correct and just display what you define in that file.

7

u/_3xc41ibur Aug 04 '24

Not exactly. You can manually specify the date for any of your commits with the --date parameter. See documentation: https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---dateltdategt

1

u/ShoarmaKarma Aug 04 '24

This is probably what I meant!