I added a big folder (.terraform
) with git add .
, and then committed.
Then I realized that's not a good idea. Edited .gitignore
. Committed.
Then realized that when pushing to origin, it was still pushing big files. Looked around and found this: Git still adds and tracks folders marked in .gitignore
So did git rm -r --cached .
, added back in everything.
My index seems to be clean.
But when I do git push origin branch
, it seems to want to upload all the big files still, as it takes a lot of time, and finally finishes with
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: 4949224cd016eea505329480a9359f56
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File scripts/terraform/testing/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.62.0_x4 is 146.95 MB; this exceeds GitHub's file size limit of 100.00 MB
How do I clean up this so that pushing doesn't push the big files which I want ignored anyways?
.gitignore
looks like this:
1 **/.terraform/*