I have repo where I don't track .gitignore
, someone committed node_modules
folder and later we decided to untrack it. Now same person(new to git) committed '.gitignore' for few commits before untracking it again. Now we have situation where if we checkout old commits, it deletes several files from repo that were not tracked and it also creates situation where 'vs code' slows down due to thousands of untracked files. What's the best way to handle this situation? I think I will need to squash those commits and keep them on seperate branch so no one checks it out accidentally. Do I have any other options?
As things happened,
.gitignore was never tracked
node_modules were tracked
.gitignore was tracked
node_modules was untracked
.gitingore was untracked