After reading this issue: https://github.com/git-lfs/git-lfs/issues/2481
I contact [email protected], they solved my issue. Here is the email content:
Hello there,
Thanks for writing in and I'm sorry for the trouble. I've just rebuilt your Git LFS usage and it's now re-enabled on your account.
Thanks, Steve
Now, I can use git-lfs.
Connection to github.com closed by remote host. 6.0 MB/s
Uploading LFS objects: 51% (275/540), 5.5 GB | 5.2 MB/s
Answer from Lin Du on Stack OverflowGit LFS disabled for account
batch response: Git LFS is disabled
git lfs - How do I disable git-lfs? - Stack Overflow
Simple steps to uninstall Git LFS from your repository
Videos
After reading this issue: https://github.com/git-lfs/git-lfs/issues/2481
I contact [email protected], they solved my issue. Here is the email content:
Hello there,
Thanks for writing in and I'm sorry for the trouble. I've just rebuilt your Git LFS usage and it's now re-enabled on your account.
Thanks, Steve
Now, I can use git-lfs.
Connection to github.com closed by remote host. 6.0 MB/s
Uploading LFS objects: 51% (275/540), 5.5 GB | 5.2 MB/s
for anyone facing this issue and visiting here for solution , I found the solution by coincidence and I have no explanation why it worked. Just uninstall git lfs before pushing and it works.
git lfs install --skip-smudge
git lfs track large_file_needed
git add .gitattributes large_file_needed
git commit -m "whatever"
git lfs uninstall
git push
Update current commit only
If you want to move off LFS, but are not so worried about fixing the entire git history, you can do the following;
git lfs uninstall
touch **/*
git commit -a
This will uninstall LFS support, touch every single file (so that git recognises that is has changed) then commit them all. If you like you could be more specific (ie, **/*.png for example). Note that using ** requires extended glob support enabled (shopt -s globstar on bash)
Update entire history
This worked for me - but it throws lots of errors (I think I'm getting an error for every commit that a file hasn't been added to LFS in) and takes a long time (roughly 2-3 seconds per commit).
git lfs uninstall
git filter-branch -f --prune-empty --tree-filter '
git lfs checkout
git lfs ls-files | cut -d " " -f 3 | xargs touch
git rm -f .gitattributes
git lfs ls-files | cut -d " " -f 3 | git add
' --tag-name-filter cat -- --all
It uninstalls git LFS support (theoretically preventing LFS from messing with the index) then for each commit it makes sure the LFS files are checked out properly, then touches them all (so git realises they have changed), removes the settings for LFS found in .gitattributes so that when cloning it doesn't keep trying to use LFS, then adds the real file to the index.
After you do the above, you will need to do a force push. Naturally, that'll throw anyone else working on your repo into a detached head state - so doing this during a code freeze is wise. Afterwards, it's probably easiest to get everyone to do a fresh clone.
git lfs migrate export
From git lfs migrate help:
Export
The export mode migrates Git LFS pointer files present in the Git history out of Git LFS, converting them into their corresponding object files.
Example Workflow
- Verify you actually have LFS files with
git lfs ls-files. - Remove all
filter=lfslines from ALL the.gitattributesfiles in your repo..gitattributescan live anywhere so make sure you find them all otherwise this can cause migration issues later. - Commit any changes you made to
.gitattributes. - Make sure you have no changes with
git status. - Run the migration:
git lfs migrate export --everything --include . - Run
git statusto make sure you have no changes. If you left.gitattributeswithfilter=lfsyou might incorrectly have changes now. - Verify all the previously listed LFS files are no longer present with
git lfs ls-files. - Inspect files (e.g., open formerly LFS files to make sure they aren't corrupt) and run your build to make sure everything works.
Tips
- Run on case sensitive file system, in case you have file system collisions (e.g. ./LICENSE and ./License) at some point.
- Git rid of all your
filter=lfslines from ALL your.gitattributes. - You may also want to delete LFS remains in
.git/hooksdirectory: pre-commit, post-commit, post-checkout, post-merge. - With
$GIT_TRACE=1there should be no sign of...trace git-lfs: filepathfilter: accepting...