git - 我的 git 存储库中所有这些 stash 的 ('._' 前缀)文件是什么?

标签 git

当我在我的目录上执行“git status”时,它显示了一堆似乎是重复的未跟踪文件。唯一的区别是它们都有一个前缀._。例如:我需要添加的未跟踪文件之一是...app/assets/stylesheets/categories.css,另一个文件将显示为 app/assets/stylesheets/。 _类别.css

有人知道这是怎么回事吗? GitHub 上好像没有什么好的文档。

最佳答案

作为mentioned here :

if for file foo you have another ._foo, and you're on a Mac, the dot-underscore file is where the file resource fork / metadata is kept.

(在“DS_Store, dot underscore (._), resource forks and annoyed Windows users”中有更详细的描述)

The .DS_Store is similar to the thumbs.db file Windows XP makes and is used to store “custom attributes of a folder such as the position of icons or the choice of a background image.”

The dot-underscore (._) files are pesky little buggers. It seems that when you use the Finder to transfer files to a non-Mac system–a Windows Server in this case–it splits the file into two parts – the data and the resource forks. When you copy the file back to the Mac, the Finder merges the two bits again. Windows can’t use the resource fork, so it’s not needed and you can delete it, but it’s a lot of hassle having to clean up after others!

另请参阅“Is there any way to prevent a Mac from creating dot underscore files?

关于git - 我的 git 存储库中所有这些 stash 的 ('._' 前缀)文件是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10323580/

相关文章:

git - 如何使用 Github 操作镜像 GitHub 存储库?

适用于 AIX 6.1+ 的 GIT 客户端

java - 我应该 checkin 这些 gradle 文件吗?

Python+Git 用于远程存储库

git - 我正在使用哪个全局 gitignore?

git - 在git中查看对已删除文件的更改

git - 如何以编程方式获取 Git 版本?

git - 如何进行git克隆并进入创建的目录

git - 如何删除未使用的 git 分支

git - 带有 gitolite 的公共(public)存储库