- I want to create mirror repository from Gitlab to Github, but i encountered an error: Larger file than Github allow, GH001: Larger files detected ,i was try using git filter-branch to remove file larger size in all commit, rewrite commit history,success but after that, i get error (in image)
- Any idea or keyword, please give me.Thanks!
Asked
Active
Viewed 276 times
1

Hydraw
- 41
- 6
1 Answers
1
First, you can use the new git filter-repo
, which will replace the old git filter-branch
or BFG.
Stripping large/big files is easy
git filter-repo --strip-blobs-bigger-than 10M
Second, git filter-branch
/git filter-repo
is a local operation: you still need to force push (git push --force --mirror) to GitLab, in order for your mirror operation to reflect the new repository state (one without large files)

VonC
- 1,262,500
- 529
- 4,410
- 5,250
-
thank for reply, i was run `git filter-branch` and push --force success to Gitlab, image above is error after i push success `git filter-branch` – Hydraw Sep 14 '20 at 05:01
-
@Hydraw Is it possible that you have cleaned up/pushed only master, and other large files exist in other branches? – VonC Sep 14 '20 at 06:02
-
I checked, all branch is not exsist large file – Hydraw Sep 14 '20 at 08:16
-
@Hydraw Are you pushing to gitlab.com? Did you do a `git push --force --mirror`, in order to push *all* branches? – VonC Sep 14 '20 at 08:28
-
Currently, because error so my mirror (Github) not yet created (empty) so i think i don't necessary to run git command above, right? – Hydraw Sep 14 '20 at 08:38
-
So how do you get your error message? Is it from GitLab.com? – VonC Sep 14 '20 at 08:48
-
Ahh,i think error from Github, and Gitlab show it, error message show when i try to create mirror repository from Gitlab to Github – Hydraw Sep 14 '20 at 08:50
-
in message error , u can see something like `/data/github/releases/...` – Hydraw Sep 14 '20 at 08:52