[英]What's the .DS_Store file that keeps changing in my Visual Studio project on macOS?
I notice when I make a small change to the application then a file called <solution>/.DS_Store
is modified and I am prompted to push the new version of that in addition to other files. 我注意到,当我对应用程序进行小的更改时,一个名为
<solution>/.DS_Store
被修改,除其他文件外,我<solution>/.DS_Store
提示推送该文件的新版本。 Is this needed and if not then should it be something that's in the .gitignore
file and how can I add it there? 这是否需要,如果不是,是否应该是
.gitignore
文件中的内容,我如何在其中添加它?
The .DS_Store
file is related to macOS, not to Visual Studio : .DS_Store
文件与macOS相关,而不与Visual Studio相关 :
In the Apple macOS operating system, .DS_Store is a file that stores custom attributes of its containing folder , such as the position of icons or the choice of a background image.
在Apple macOS操作系统中, .DS_Store是一个文件,用于存储其包含文件夹的自定义属性,例如图标的位置或背景图像的选择。 The name is an abbreviation of Desktop Services Store , reflecting its purpose.
该名称是Desktop Services商店的缩写,反映了其用途。 It is created and maintained by the Finder application in every folder, and has functions similar to the file desktop.ini in Microsoft Windows .
它是由Finder应用程序在每个文件夹中创建和维护的,其功能类似于Microsoft Windows中的 desktop.ini文件。 Starting with a full stop (period) character, it is hidden in Finder and many Unix utilities.
以句号(句号)开头,它被隐藏在Finder和许多Unix实用程序中。 Its internal structure is proprietary .
其内部结构是专有的 。
It should almost certainly be ignored by your version control system. 您的版本控制系统几乎肯定会忽略它。 Add
加
.DS_Store
to your project's .gitignore
file and then untrack the file by running 到项目的
.gitignore
文件,然后通过运行取消跟踪文件
git rm --cached .DS_Store
and commit the change. 并提交更改。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.