每次替换受版本控制的 Photoshop .psd
文件时,我都会问自己这个问题。
您可以使用 ls -l
看到 PS 已经在资源分支中创建了一个缩略图图标。
最佳答案
Git 不会跟踪元数据,因为这些资源不是文件内容的一部分(所以你的答案是“否”)。
在他的“跨平台版本控制”条目中,Jakub Narębski评论:
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 e.g. 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 e.g. etckeeper uses metastore (in Git).
Thomas Tempelmann the comments 中的注释:
Actually, since macOS 10.12,
textClippings
store the info also in the data fork, inplist
format, with the same keys and values of the resource fork's contents.The only thing that won't work is QuickLook if the rsrc is missing, but opening these files will show the content.
Therefore, storing.textClipping
files in Git is not hopeless.
关于git - git 是否跟踪资源 fork ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1130059/