私が読むことができるGitFaqでは、
Git は、変更するすべてのファイルのタイムスタンプとして現在の時刻を設定しますが、それらのみを設定します。
ただし、次のコマンド シーケンスを試しました。
$ 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--r-- 1 exxxxxxx Administ 132 Feb 12 18:36 filea
-rw-r--r-- 1 exxxxxxx Administ 0 Dec 30 10:00 fileb
$ git status -a
warning: LF will be replaced by CRLF in filea
# On branch master
warning: LF will be replaced by CRLF in filea
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: filea
#
$ git checkout .
$ ls -l
total 0
-rw-r--r-- 1 exxxxxxx Administ 0 Feb 12 18:36 filea
-rw-r--r-- 1 exxxxxxx Administ 0 Feb 12 18:36 fileb
Git が file のタイムスタンプを変更したのはなぜfileb
ですか? タイムスタンプは変わらないと思います。
私のコマンドが問題を引き起こしていますか? git checkout . --modified
代わりにaのようなことをすることは可能でしょうか?
git version 1.6.5.1.1367.gcd48
MinGW と Windows XP で使用しています。