Import historical file backups?

I have a couple of repositories in GitHub but before I created them there they existed for 20 years as local copies on my local drives. I have taken regular backups over the years and would like to know if I can import them to GitHub somehow to give a history for the repositories and allow diffs? The files have not existed in any version control other than as files in a filesystem, though I do have the backups all nicely organised and dated with comments. Locally I use GitHub Desktop and also have Mercurial and SourceTree

I did wonder about simply pushing them to GitHub one by one, overwriting the local copy sequentially moving forwards in time - perhaps not all 20 years, but significant points. I am not sure how this will leave me in terms of dates and versions?

I have a feeling that what I want to do may not be possible but if anybody thinks it is could they please point me in the right direction via an article, search term or anything really

Thanks

git commit lets you override both author and committer date, if you want. The author date is the one that’s supposed to say when the change was originally created, but in my experience Github shows the committer date in the web UI. So you could go through the archived versions and commit them to a fresh (empty) branch or repository in chronological order, setting the date(s) as needed.

Now what may be a problem is uniting the history you’d create that way with the repositories you already have. Technically it should be possible to rebase your newer commits on top of the imported history. However that would change your existing Git history, which may cause issues if you have shared your repositories with more than a few people. See “Rewriting History” for a discussion of that:

Thanks very much. I will investigate what have suggested and experiment