.gitignore
文件中放置什么内容,都不能让 Git 忽略下面的 UserInterfaceState.xcuserstate
文件。$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
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: .gitignore
modified: CalFoo.xcodeproj/project.xcworkspace/xcuserdata/wcochran.xcuserdatad/UserInterfaceState.xcuserstate
我正在使用/编辑这篇文章上列出的.gitignore
文件。我尝试了包括完全路径名在内的所有匹配模式,例如:CalFoo.xcodeproj/project.xcworkspace/xcuserdata/wcochran.xcuserdatad/UserInterfaceState.xcuserstate
,但都没有成功。
这个问题特别出现在使用Xcode创建初始git仓库和之后添加这里的.gitignore
文件的工作流中。更一般的解决方法可以从这个问题中找到(我猜我在搜索中从来没有找到这篇文章,因为标题中没有“gitignore”)。