I use git to distribute code to an embedded system. Sometimes files get corrupted without changing the mtime, and I want to re-check everything out. Git normally doesn't bother checking the sha of files where the stat info hasn't changed. How can I make it check?
I've tried with
git -c core.ignorestat=yes reset --hard
but that doesn't work.
Try setting core.trustctime
to 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.
(I haven't tried this, but it looks like it might do the trick.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With