"error: failed to push some refs" during initial push to github

We’ve decided to migrate from Bitbucket to Github. We have a relatively large existing repo that’s maybe 500 MB plus 20+ GB of files stored in git-lfs.

I’m having trouble doing the initial push to github, as it’s rejecting certain *.csv files in our git history because they’re too large. We’ve been storing our *.csv files in git-lfs for a while, but there are apparently some old ones way back in the bowels of our history that haven’t been migrated.

That seems easy enough to fix - just run this command:

git lfs migrate import --everything --include="*.csv"

And that seems to work - except that when I run git lfs migrate info --everything, it doesn’t seem to have sucked in the *.csv files:

PS E:\source\swyfft_web_ken> git lfs migrate info --everything
migrate: Sorting commits: ..., done.
migrate: Examining commits: 100% (131623/131623), done.
*.cs 3.1 GB 142030/142038 files(s) 100%
*.csv 1.3 GB 2102/2102 files(s) 100%
*.csproj 1.1 GB 15634/15634 files(s) 100%
*.exe 224 MB 43/43 files(s) 100%
*.ts 150 MB 6133/6134 files(s) 100%

And when I try to push the rewritten repository to GitHub, it still complains about there being *.csv files that are too large for GitHub to accept. (Can’t get the exact error message, as the error takes about 8 hours to show up, and the last time I got it has scrolled off my terminal.)

Am I misunderstanding something about how git lfs migrate is supposed to work? Or am I doing something wrong?

(Cross-posted to https://stackoverflow.com/questions/61823844/git-lfs-migrate-doesnt-seem-to-be-migrating-files.)

Hi @ken-swyfft,

Thank you for being here! I wish I had better news, I believe this is related to a known bug. A quick look at this issue and I see that you’ve also taken a look there. Let me do a little and see if there is anything else we can suggest. Thanks for your patience.

Thanks, Andrea. Let me know. At this point, our migration to Github is completely blocked, and I’m going to have to cancel our account unless we can figure out how to get the repo in.

I don’t suppose there’s any way to (temporarily?) bump up the max file size for us? The bad file snuck in because BitBucket doesn’t have that limit - it just has a max repo size of 2 GB. GitHub’s full repo limit is much larger, but is much smaller for actual individual files, which is what’s throwing us right now.

Hi @ken-swyfft,

Please check your email for a message from support reference a temp bump.

Thanks, working on it right now.