I have been trying to set up a mirror from GitLab to GitHub for a repository that includes two large PowerPoint files. These files are already being handled by Git LFS on GitLab, and I have confirmed their status with the following:
Copy code
git lfs ls-files
# Output:
# path/Presentation1.pptx
# path/Presentation2.pptx
GitLab also shows them as managed by "LFS". However, when I try to create a GitLab mirroring repo to my GitHub repo, the mirroring fails with the following error:
3:push to mirror: git push: exit status 1, stderr:
"remote: warning: File path/Presentation1.pptxis 90.21 MB;
this is larger than GitHub's recommended maximum file size of 50.00 MB
\nremote: error: Trace: b7ec6bb49b29a6aae7c442ac108dfb091ea671a5dd3a40feb3dd88e00562377c
\nremote: error: See https://gh.io/lfs for more information.
\nremote: error: File path/Presentation2.pptx is 119.06 MB; this exceeds GitHub's
file size limit of 100.00 MB \nremote: error: GH001: Large files detected.
You may want to try Git Large File Storage - https://git-lfs.github.com.
To https://github.com/username/repo.git\n ! [remote rejected] master -> master
(pre-receive hook declined)\nerror: failed to push some refs to 'https://github.com/username/repo.git'\n".
Despite the error suggesting to use Git LFS, I have already set up LFS for these files on GitLab. The relevant line in my .gitattributes file is as follows:
path/*.pptx filter=lfs diff=lfs merge=lfs -text
I am looking for a way to resolve this issue so that the mirroring process can be completed successfully without any errors. Any assistance would be much appreciated. Thank you!
In case GitLab's default "Mirror Repository" functionality does not work due to the large file size issues, I also thought about alternative solutions to ensure that the GitLab and GitHub repositories remain 100% identical and in sync at all times. Maybe utilizing a CI/CD pipeline to automate the mirroring process would be an alternative. This could be set up on GitLab, and on every push to GitLab, the pipeline would push the changes to GitHub as well.
I actually just deleted the old repo, set up a new repo, and pushed the same content - and it worked. All other things like modifying the history, etc. didn't work.