Created
November 20, 2023 17:03
-
-
Save ValchanOficial/eaeb4b22cb387347d3c65339599805ae to your computer and use it in GitHub Desktop.
About large files on GitHub
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
https://docs.github.com/pt/repositories/working-with-files/managing-large-files/about-large-files-on-github | |
Open Git Bash. | |
Change the current working directory to your local repository. | |
To remove the file, enter git rm --cached: | |
$ 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.com: | |
$ 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