Why doesn't Git ignore my specified file?

前端 未结 13 1549
野性不改
野性不改 2020-11-28 17:12

I added the following line to .gitignore:

sites/default/settings.php

but when I type git status it shows the file

13条回答
  •  庸人自扰
    2020-11-28 18:06

    I tried most commands above on VS Code terminal and I got errors like:

    fatal: pathspec '[dir]/[file]' did not match any files

    I opened the project on GitHub Desktop and ignored from there and it worked.

提交回复
热议问题