.gitignore not ignoring web.config

git will not ignore a file that was already tracked before a rule was added to this file to ignore it. In such a case the file must be un-tracked with git rm --cached <filename>.

So if you are trying to ignore this file newly, run this: git rm --cached web.config.


If the only you want to do is to prevent commits of web.config that you are running locally without affecting the one inchecked then run this command (in cmd or ps) under your project folder.

git update-index --assume-unchanged web.config

Tags:

Git

Umbraco