简体   繁体   English

什么是在MacOS上的Visual Studio项目中不断更改的.DS_Store文件?

[英]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.

相关问题 Visual Studio不断更改project.sln文件 - Visual Studio keeps changing project.sln file 项目文件夹结构更改后,Visual Studio 2017 调试器一直在寻找 DLL 的 .obj 文件 - Visual Studio 2017 debugger keeps looking for DLL's .obj file after project folder structure changed WPF xaml Visual Studio会自动更改我的资源路径 - WPF xaml Visual Studio keeps automatically changing pathway to my resource Visual Studio 2010不断更改我的默认浏览器 - Visual Studio 2010 keeps changing my default browser Visual Studio 不断显示我的项目中的 bin 文件夹 - Visual Studio keeps showing the bin folder in my project 我的Visual Studio * .sln文件中此字符串的用途是什么? - What's the purpose of this string in my Visual Studio *.sln file? Visual Studio项目文件中的__MvcPagesVersion__是什么? - What is __MvcPagesVersion__ for in Visual Studio project file? Visual Studio不断更改resx文件 - Visual Studio keeps changing resx files 确定Visual Studio项目文件是使用旧格式还是新的.NET Core格式的最佳方法是什么? - What's the best way to determine if a Visual Studio project file is using the legacy format or the new .NET Core format? Unity不断从我的Visual Studio项目中删除log4net - Unity keeps removing log4net from my Visual Studio project
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM