Skip to content

Instantly share code, notes, and snippets.

@ValchanOficial
Created November 20, 2023 17:03
Show Gist options
  • Save ValchanOficial/eaeb4b22cb387347d3c65339599805ae to your computer and use it in GitHub Desktop.
Save ValchanOficial/eaeb4b22cb387347d3c65339599805ae to your computer and use it in GitHub Desktop.
About large files on GitHub
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