简体   繁体   English

git 显示已添加到 gitignore 的文件中的更改?

[英]git is showing changes in files that are already added to gitignore?

I have already added log2 folder and main.js file to .gitignore as can be seen in the screenshot.我已经将 log2 文件夹和 main.js 文件添加到 .gitignore,如截图所示。

But even after executing git rm --cached .-r I could still see git is detecting changes in main.js and files inside log2 folder.但即使在执行git rm --cached .-r我仍然可以看到 git 正在检测 main.js 和 log2 文件夹中的文件中的更改。

How come?怎么来的?

在此处输入图片说明

The usual problem with these is a gitignore coded in UTF-16.这些的常见问题是用 UTF-16 编码的 gitignore。 Save it as UTF-8.将其另存为 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. UTF-16 在这一点上是多余的膨胀,为了让 utf-16 看起来不坏而添加新代码只会加剧浪费。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 文件夹添加了它。gitignore 仍然显示在 Git 更改中 - Folder added it .gitignore still showing up in the Git changes 为什么git仍然跟踪已经添加到.gitignore文件的扩展名的文件 - Why is git still tracking files with extensions already added to .gitignore file 删除所有已经基于.gitignore添加到git仓库的文件 - Delete all files already added to git repository based on .gitignore git 状态显示.gitignore 中列出的文件的“更改未暂存以进行提交”? - git status is showing "Changes not staged for commit" for files listed in .gitignore? 如果文件已经添加到git中,IntelliJ如何在提交之前更改文件 - How does IntelliJ changes files before commit if they are already added to git 添加到 Git 子模块中的 .gitignore 文件 - .gitignore files added inside Git submodules Git:无论如何,是否要推送一个已经添加到gitignore中的文件? - Git: Is there anyway to push one file which is already added into gitignore? 即使已添加到gitignore中,新文件仍会在git中显示 - New file keeps showing up in git even though added to gitignore Git:如何删除现在位于gitignore但之前已添加到repo的文件 - Git: How to remove files that are now in gitignore but were added to repo before 将文件添加到 .gitignore 后,git 是否会从版本控制中删除文件? - Does git remove files from version control after they are added to .gitignore?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM