git still shows files as untracked despite .gitignore and rm -r --cached. What did I do wrong?

南笙酒味 提交于 2019-12-03 13:58:19
David Jacquel

Your .gitignore file is currently detected as UTF-16LE encoded. Changing encoding to UTF-8 is the solution.

To fix:

  • Open the .gitignore file in a text editor such as Notepad++
  • Change the encoding (in np++, this is via the Encoding menu) to UTF-8 without BOM
  • Save the file.
  • Add the .gitignore file into staging
  • git commit -m "fixed ignore file"

At this point, the ignore file should start working correctly.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!