Following close to these steps and borrowing some of these
You must use BFG Repo-Cleaner to meet GitHub's file size requirements. Download BFG Repo-Cleaner into the same directory of where you're gonna clone your repos in this process.
git clone --mirror https://gitlab.com/gluser/your-original-repo.git
Rename the bfg .jar
file to bfg.jar
. It's easier to type it thise way.
cd your-original-repo.git
git reflog expire --expire=now --all
git gc --prune=now --aggressive
The gc
command should take some time
Instead of pushing the repo back to GitLab Push the mirror to GitHub!
git push --mirror https://github.com/ghuser/your-new-repo.git
THIS WILL LOOK LIKE IT'S NOT DOING ANYTHING LEAVE IT ALONE FOR A FEW MINUTES
When you're done the repo should now be on GitHub!