Created
March 13, 2019 11:37
-
-
Save avkosme/7f9db16d34db2ba7354705309a78dbb4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git rm --cached giant_file | |
# Stage our giant file for removal, but leave it on disk | |
Commit this change using --amend -CHEAD: | |
$ git commit --amend -CHEAD | |
# Amend the previous commit with your change | |
# Simply making a new commit won't work, as you need | |
# to remove the file from the unpushed history as well | |
Push your commits to GitHub: | |
$ git push | |
# Push our rewritten, smaller commit | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment