Skip to content

Instantly share code, notes, and snippets.

@ndamulelonemakh
Created August 9, 2022 02:03
Show Gist options
  • Save ndamulelonemakh/5c08cd95f0a035252dcd62e31b80ce3e to your computer and use it in GitHub Desktop.
Save ndamulelonemakh/5c08cd95f0a035252dcd62e31b80ce3e to your computer and use it in GitHub Desktop.
Git lfs revert
## Proble:
# Apparently some blobs were not uploaded to the server
# Causeing git lfs to stop working
# I could not even push to other remotes becuase of this
# Solution 1:
# Revert to a commit before running: git lfs install
git checkout <commit-hash>
git switch -n mynewbranch
git push -u origin mynewbranch
# Now overwrite the old master branch with the new one
git checkout master
git reset --hard mynewbranch
git push -u origin master --force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment