git - Ignored file still showing changes -
my .gitignore
follows:
## ignore visual studio temporary files, build results, , ## files generated popular visual studio add-ons. # project files *.sln *.vcxproj *.vcxproj.filters upgradelog.htm # user-specific files *.suo *.user *.userosscache *.sln.docstates # ....
now of these files ignored properly, exception of solution file, main.sln
. why not ignored when put in gitignore?
is due main.sln existing before added ignore? thought stop tracking if placed within ignore guess that's not case. here's screenshot:
how can stop tracking changes main.sln
?
lines in .gitignore
ignore files not part of repository. once added repository, tracked, , cannot ignored.
if want stop traking file have remove git tree. do, command line:
$ git rm --cached main.sln
and commit change. on, file gitignored.
note: --cached
option keep real file in working directory. without file deleted.
Comments
Post a Comment