Preserving timestamps with git
jakob.voss at gbv.de
Fri May 28 14:45:47 CEST 2010
Olaf TNSB wrote:
> Can you explain (or give a simple example) why you need the timestamps
> to be "correct".
> After moving to a versioned homedir (and getting my mind around what
> that means) I've never worried about the revision time of my files. I
> just knew they were either the most recent version or a particular
> version for a particular reason.
In my homedir I have a "mypub" directory/repository with lots of
publications (presentations, articles, drafts etc.) that I created and
partly published over the years[*]. I frequently look up old drafts and
publications and sometimes I continue working on a text after month or
years. Therefore I'd like to track when I created and modified which
> I can understand the need for other metadata (file perms for .ssh for
> example) but not file date. Perhaps I'm missing something huge that
> will make my life easier...
As I only track my own files I do not need to preserve ownership and the
default permission should be 027 (u=rwx,g=rx,o=) for all my files. There
is only a problem with files that should be readable by anyone (or the
other way you make all files publicly readable and must treat the
private files in a special way). Versioning public_html is also a
problem because files must be readable by www-data (and some also
writable) - is this where you use metastore for?
[*] Maybe I will later create a branch with the public subset of this
files. At this place file permissions would also help: a cronjob could
look for files with permission "o+r" and push these into a public
repository. And the other way: a cronjob checks for files which are both
in a private repository and its public branch and sets permission "o+r"
More information about the vcs-home