简体   繁体   中英

Does git track resource forks?

I ask myself this every time I replace a Photoshop .psd file that I have under version control.

You can see with ls -l that PS has created a thumbnail icon in the resource fork.

Git will not track metadata, as those resources are not part of the content of the file (so your answer is "no" ).

In his "Cross-Platform Version Control" entry, Jakub Narębski comments:

The issue of extra metadata that is not SCM-sane, and which different filesystems can or cannot store.
Examples include full Unix permissions, Unix ownership (and groups file belongs to), other permission-related metadata such as ACL, extra resources tied to file such as EA (extended attributes) for some Linux filesystems or (in)famous resource form in MacOS (resource fork on MacOS vs. xattrs on Linux: issue 5 in Eric Sink article ).

This is not an issue for SCM: source code management system to solve.
Preserving extra metadata indiscrimitedly can cause problems, like eg full permissions and ownership.
Therefore SCM preserve only limited SCM-sane subset of metadata.
If you need to preserve extra metadata, you can use (in good SCMs) hooks for that, like eg etckeeper uses metastore (in Git).

Short answer is no .

On the mac, by default, git does not track resource forks, or xattrs or finder info.

git will "slice" your resource forks right off, which is exactly what I wanted.

Other tools, like cp and rsync have been patched on the mac to preserve
this metadata, which at times is convenient and at other times annoying.

git is not yet annoying. Or convenient, depending on your POV.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM