我正在使用GitHub作为ios项目的项目存储库.但是每当我试图从xcode 8中提取项目时,我都会收到错误,因为"文件.DS_Store和.DS_Store存在树冲突".任何解决方案?
我是Git的新手,每次使用它时,我都会.DS_Store在我未跟踪的文件中感到烦恼.我假设这是我的工作目录.
我尝试在Stack Overflow上搜索答案,但只找到了如何从存储库中删除它的答案,而不是从未跟踪文件列表中删除它.
我怎么能告诉Git完全忽略.DS_Store文件,从不将它们列为未跟踪文件?
在 git 忽略列表中我有:
build/**
.DS_Store
Run Code Online (Sandbox Code Playgroud)
更新一些文件后 git status 显示:
modified: db/main/res/.DS_Store
Run Code Online (Sandbox Code Playgroud)
我没想到会显示已.DS_Store修改,因为它位于忽略列表中。工作目录或项目根目录是~/myproj.
如何解决这个问题?
我不希望我的 MacBook 的 .DS_Store 文件提交到我的 Git 存储库。
不幸的是,我的 .gitignore 甚至 .gitignore_global 似乎都被完全忽略了。
任何想法可能是什么原因?
ujjain:~/Dropbox/workspace| (HEAD) [+1] | feature/Jenkinsfile [+1]
$ cat .gitignore
...
# Mac OS Test
.DS_Store
ujjain:~/Dropbox/workspace| (HEAD) [+1] | feature/Jenkinsfile [+1]
$ git status
On branch feature/Jenkinsfile
Your branch is up to date with 'origin/feature/Jenkinsfile'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: .DS_Store
no changes added to …Run Code Online (Sandbox Code Playgroud)