Git - Why .txt file is not being ignored
5 answers
I think you added this file .txt
to the intermediate level index before including it .txt
in the file .gitignore
. To ignore this, you must remove this .txt
file from the staging index. To remove it from the hosting index, but not from the working directory, insert the following line:
git rm --cached my_file.txt
If that doesn't work, insert:
git rm --cached my_file.txt -f
+1
source to share