In GitFaq, I can read that
Git sets the current time as a timestamp for each file that it changes, but only those.
However, I tried this command sequence ( EDIT: added full command sequence)
$ git init test && cd test Initialized empty Git repository in d:/test/.git/ $ touch filea fileb $ git add . $ git commit -m "first commit" [master (root-commit) fcaf171] first commit 0 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 filea create mode 100644 fileb $ ls -l > filea $ touch fileb -t 200912301000 $ ls -l total 1 -rw-r
Now my question is: why did git change the timestamp of the fileb file? I expect the timestamp to not change.
Are my teams causing the problem?
Maybe instead you can do something like git checkout . --modified git checkout . --modified ?
I am using git version 1.6.5.1.1367.gcd48 under mingw32 / windows xp.
source share