Delete files that shouldn't have been committed
I have a .gitignore file in my projects directory and I put the following entry in the file to avoid committing files in the following folder:
EStudyMongoDb.Integration.Test\
For some reason, Git is pushing files into the repository!
Anyway! now I want to delete those files that have been pushed to the repository, but I don't want to lose my local changes to the files inside the folder. How can i do this?
+2
a source to share
2 answers
Use git rm --cached
to remove files from the index, but not from your working copy. Then copy the changes.
+2
a source to share