I am trying to add a folder that has to be tracked, however it is > 1GB / > 20k files.
As soon I add it, I will get warning about too many active changes and Git simply will refuse to work correctly (on VS Code after the warning I cannot commit anything is it says there is no changes (yet left side button shows that there are changes)).
Tried to use command line but simply doesn't push new folder :/
Any advice how to deal with lots of new files ? I will have ~ 5-6x folders between 1GB - 5GB and from 20k - 200k filer per folder.
I've ran into similar problems with VS Code. If you are currently stuck where VS Code git extension keep repeating this message, put the offending folder in .gitignore then delete the git object cache for it.
git rm -r --cached path/to/folder
A good strategy for large amount of files in VS Code is to compartmentalize each folder and commit separately as stated by Lasse.
Something like in .gitignore structure of splitting the folder like this
folder/folderA
folder/folderB
folder/folderC
Remove one at a time and commit, and be as granular as required. Rinse and repeat. And if you have phpstorm use that instead for these large commits.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With