.gitignore not ignoring web.config

前端 未结 2 1779
萌比男神i
萌比男神i 2020-12-23 20:42

For my remote repository, I\'m trying to ignore the web.config file of my Umbraco website. The .gitignore is in the root of my website, and the file to ignore, web.config is

2条回答
  •  孤独总比滥情好
    2020-12-23 21:38

    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 .

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

提交回复
热议问题