On 27.05.2010 13:26, martin f krafft wrote:

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

I thought about rewriting the history so I would be something with 'git filter-branch' if this can also split one commit with N files into N commits with one commit for each file.

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

I found the --date parameter and read more about it. I think I need a kind of "git-import-files" script that imports files just like you can import other repositories (SVN, CVS...).

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.

Thanks, this will be helpful for special repositories that need to preserve file permissions. But as long as I use git for replication I prefer to have the timestamp metadata directly in the commit as if I would commit everytime I changed a file. It's a pitty that there is no good versioning file system for Linux yet.

Cheers
Jakob

--
Jakob Voß <jakob.v...@gbv.de>, skype: nichtich
Verbundzentrale des GBV (VZG) / Common Library Network
Platz der Goettinger Sieben 1, 37073 Göttingen, Germany
+49 (0)551 39-10242, http://www.gbv.de
_______________________________________________
vcs-home mailing list
vcs-home@lists.madduck.net
http://lists.madduck.net/listinfo/vcs-home

Reply via email to