Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Can't be removed automatically.
Files added to .gitignore will not be automatically committed, but if they already exist in the repository, or you explicitly add any such file, then they will not be deleted by themselves, and their changes will automatically be committed.
Therefore, you need to both add them to .gitignore and explicitly remove them from the repo.
git rm -r --cached .
--cached
will tell git what to remove from the index, it will not touch real files
Instead of a dot, you can specify a specific file
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question