0

Sometimes TortoiseGit reports a file as modified locally while the content of the file has not changed. This seems to happen if the file's timestamp has changed. If it happens, the revert command usually does not help, i.e. it is executed successfully, but TortoiseGit still reports the file as modified.

Is there any way to tell TortoiseGit (or Git) to ignore changes to a file's timestamp? Or is there a way to make the revert command work in such situations?

MrTux
  • 32,350
  • 30
  • 109
  • 146
Timo Kunze
  • 135
  • 1
  • 6

1 Answers1

0

The commit dialog should always report the correct state as found by git.

A possibel reason why all files show up as changed are automatic conversions such as core.autocrlf or .gitattribute end of line normalizations.

If you recently made changes here, please make sure that you normalized your repository as mentioned here: https://stackoverflow.com/a/15646791/3906760

Community
  • 1
  • 1
MrTux
  • 32,350
  • 30
  • 109
  • 146
  • Thanks. It turned out that the issue had two reasons: 1. My TortoiseDiff is configured to ignore casing changes. So if a file contains only casing changes (which happens often with VB6 code as the language is not case-sensitive, but the IDE tends to change the casing every now and then), Git correctly reports it as modified, but TortoiseDiff does not show any single modification due to its configuration. 2. The revert command sometimes did not work because indeed the normalization has been missing. – Timo Kunze Aug 02 '16 at 13:31