git在Windows上始终显示修改后的文件,即使对于新克隆的回购 [英] git on windows shows modified files all the time, even for newly cloned repo

查看:209
本文介绍了git在Windows上始终显示修改后的文件,即使对于新克隆的回购的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows机器上遇到了问题。我总是有一些在每个回购库中修改的git文件,显示为已修改的文件是相同的。

如果我克隆一个新的repo并使用tortoisegit来提交,我会看到一些文件被修改,即使我从未触及过repo中的单个文件。 gitstatus不显示任何修改,但

任何帮助表示赞赏。谢谢

解决方案

检查更改是否仅仅是文件权限的更改。这就是我的原因,TortoiseGit和Git Extensions都显示未修改的文件。



使用 git config core.fileMode false 改为忽略chmod差异(或直接编辑 .git / config 档案)。

您也可以想用 git config --global core.filemode false 设置这个全局配置。


I am having issues with my git on a windows machine. I always have some git files that are modified in every repo, the files that show as modified are same.

If I clone a new repo and use tortoisegit to commit I see some files as modified, even if I never touched a single file in the repo. "gitstatus" doesnt show any modifications though

Any help is appreciated. Thanks

解决方案

Check if the changes are merely changes in file permissions. This was the reason in my case, both TortoiseGit and Git Extensions displayed unmodified files.

Use git config core.fileMode false to ignore chmod differences (or directly edit the .git/config file).

You may also want to set this as the global config with git config --global core.filemode false.

这篇关于git在Windows上始终显示修改后的文件,即使对于新克隆的回购的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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