Recently, I enabled git lfs for my gitlab project while checking in a 200 MB file. And this I could successfully and verify that in remote this new 200 MB file shows LFS
.
In the past I had checked-in few 10 MB files without lfs. Those exist in remote too. What is the best way to migrate those to lfs?
I tried following:
git lfs migrate import --everything --include="*.pkl" --verbose
And then when I try git push
, I get an error -
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'yourgit.internal.yourdomain.com:<user>/project.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
git pull
does not work either. What is the way to migrate existing files to lfs? Will adding --include-ref=refs/heads/master
to the migrate command help?
And do I need to do anything extra for the other branches?