Preserving timestamps with git

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


also sprach Jakob Voss <jakob.voss at gbv.de> [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
metastore:

  http://repo.or.cz/w/metastore.git

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

-- 
martin | http://madduck.net/ | http://two.sentenc.es/
 
"the perfect gun is an idealist without any ideal."
                                                  -- mc 900 ft jesus
 
spamtraps: madduck.bogus at madduck.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature (see http://martin-krafft.net/gpg/)
URL: <http://lists.madduck.net/pipermail/vcs-home/attachments/20100527/c3391d53/attachment.pgp>


More information about the vcs-home mailing list