TL;DR: Is there an effective way to push “from now on, only” to a git repository mirroring another, without losing the history on other mirrors of the same project?
I have a project of a certain scale (that is to say, “fat”) that is being pushed to three different repositories; one internal to a group “sponsoring” the project, one being Sourceforge, and one being GitHub.
Unfortunately, before this project “went public” to GitHub, some large AI “knowledgebase” type data files were added to the repository as CSV files; several over GitHub's size limit (soft limit 50MiB, hard limit 100MiB)
Once we realised the size issues, I've removed the files and pushed BZ2 files that the Makefile will (once I get around to doing it right) expand back out during the build process, when the files are compiled into the system's state.
Now, the internal repository and the Sourceforge are in sync, but even though the files are absent in the HEAD, I cannot push to GitHub.
Short of wiping out the .git control files (argh, and there are submodules! What a pain to set up properly again…) and starting over, is there a way to so something like
git push origin BRANCH
git push sourceforge BRANCH
git push github from-xyzzy-to-HEAD:BRANCH
My best guess was to use
git push github 320ce5..HEAD:BRANCH
but I get error: src refspec 320ce5..HEAD does not match any. error: failed to push some refs to …
(Note: 320ce5 is the latest commit, the one with the offending CSV files removed. So it's presumable = HEAD. I also tried adding a useless empty file and then removing it to “fake” some history in case that was the issue, but it didn't help.)
I'm starting to believe that the answer is “no,” and I should just archive the prior repository state, bite the bullet, and start over, which really shouldn't hurt anyone's feelings too much, but it is an hassle.