git正在显示已添加到gitignore的文件中的更改? [英] git is showing changes in files that are already added to gitignore?

查看:108
本文介绍了git正在显示已添加到gitignore的文件中的更改?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在.gitignore中添加了log2文件夹和main.js文件,如屏幕截图所示.

I have already added log2 folder and main.js file to .gitignore as can be seen in the screenshot.

但是即使执行git rm --cached .-r之后,我仍然可以看到git正在检测main2.js和log2文件夹中文件的更改.

But even after executing git rm --cached .-r I could still see git is detecting changes in main.js and files inside log2 folder.

怎么来?

推荐答案

通常的问题是使用UTF-16编码的gitignore.将其另存为UTF-8.在这一点上,UTF-16是多余的膨胀,添加新代码只是为了使utf-16看起来不错,只会增加浪费.

The usual problem with these is a gitignore coded in UTF-16. Save it as UTF-8. UTF-16 is redundant bloat at this point, larding new code just to make utf-16 not look bad would just be compounding the waste.

这篇关于git正在显示已添加到gitignore的文件中的更改?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆