gpt4 book ai didi

visual-studio - 在 macOS 上的 Visual Studio 项目中不断变化的 .DS_Store 文件是什么?

转载 作者:行者123 更新时间:2023-12-03 23:12:51 25 4
gpt4 key购买 nike

我注意到当我对应用程序进行一些小的更改时,一个名为 <solution>/.DS_Store 的文件被修改,并且除了其他文件之外,我还被提示推送该文件的新版本。这是需要的吗,如果不需要,那么它应该是 .gitignore 文件中的内容,我该如何将其添加到那里?

最佳答案

.DS_Store file is related to macOS, not to 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. The name is an abbreviation of Desktop Services Store, reflecting its purpose. It is created and maintained by the Finder application in every folder, and has functions similar to the file desktop.ini in Microsoft Windows. Starting with a full stop (period) character, it is hidden in Finder and many Unix utilities. Its internal structure is proprietary.



您的版本控制系统几乎肯定会忽略它。添加
.DS_Store

到您项目的 .gitignore 文件,然后通过运行取消跟踪该文件
git rm --cached .DS_Store

并提交更改。

关于visual-studio - 在 macOS 上的 Visual Studio 项目中不断变化的 .DS_Store 文件是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54723508/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com