i’ve been working on a small coding project with a few friends. In this project, they downloaded an open source online game (Space station 13, if you’re curious) and uploaded their modifications to github as a new Repo. This works fine, but when working with original code, I cannot see history from the original game we downstreamed from, just showing as “Initial commit” since it was a source code uploaded opposed to properly downstreaming their repo. I am wondering, would it be possible to set the original repo as an upstream now, or would it be pretty much impossible at this point? (there’s like 5 years of commits and I joined the group relatively recently.)
I’ve not tried anything myself besides looking up this question online, and found nothing myself that was useful. I dont actually have repo control access, but I do make PRs to it. I would probably need to walk them through what to do.
1
Roughly the steps you would need to do are:
- Create a new fork of the upstream repo and reset your
HEAD
to when you originally copied the repo’s source, lets call thismain
- Bring in your repo as a new
remote
in this fork (multiple unrelated git histories can live in the same repository). - Cherry pick each of your changes onto the new
main
branch.
You won’t be able to make this change as a PR though, you need admin access because this is basically a full reset and rewrites the entire history your original fork/copy made. All of the commits in this 5 year will get a new commit hash.