我使用 git 将代码分发到嵌入式系统。有时文件会在不更改 mtime 的情况下损坏,我想重新检查所有内容。 Git 通常不会检查统计信息未更改的文件的 sha。我怎样才能让它检查?
我试过
git -c core.ignorestat=yes reset --hard
但这不起作用。
最佳答案
尝试将 core.trustctime
设置为 false
:
core.trustctime
If false, the ctime differences between the index and the working copy are ignored; useful when the inode change time is regularly modified by something outside Git (file system crawlers and some backup systems). See git-update-index(1). True by default.
(我还没有尝试过这个,但看起来它可能会成功。)
关于git - 即使统计信息可能没有更改,如何让 git 检查每个文件的内容?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9321253/