Preserving timestamps with git

martin f krafft madduck at
Thu May 27 13:26:05 CEST 2010

also sprach Jakob Voss <jakob.voss at> [2010.05.26.1826 +0200]:
> But git-utime is only one side of the process. How do I
> 1) reset the commit time of selected files in the repository to their
> last modification timestamp (for the files that I have already
> commited)

man touch

> 2) add and commit a set of files in a batch such that each commit has
> the timestamp of the last modification time of its file (for new
> files).

man git-commit

> How do you deal with timestamp of you files? I heard there are
> some hacks to even preserve file permissions but I'd prefer
> a simple solution first.

Well, I'd suggest you don't reinvent the wheel and instead use

It doesn't force you to do one-commit-per-file, but instead just
saves and restores the metadata separately.

martin | |
"the perfect gun is an idealist without any ideal."
                                                  -- mc 900 ft jesus
spamtraps: madduck.bogus at
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature (see
URL: <>

More information about the vcs-home mailing list