我只是试图检查我的主分支并遇到:
error: Untracked working tree file 'app.xcodeproj/project.xcworkspace/xcuserdata/u.xcuserdatad/UserInterfaceState.xcuserstate' would be overwritten by merge.
因此,我尝试使用以下命令从 git 中删除此文件(我已经在 .gitignore 中添加了一个表达式来捕获它):
git rm --cached app.xcodeproj/project.xcworkspace/xcuserdata/u.xcuserdatad/UserInterfaceState.xcuserstate
并得到:
fatal: pathspec 'app.xcodeproj/project.xcworkspace/xcuserdata/u.xcuserdatad/UserInterfaceState.xcuserstate' did not match any files
所以,有点亏。据我了解,工作文件不是这里的问题。但是,为了完整起见,确实存在工作文件。例如
ls -l app.xcodeproj/project.xcworkspace/xcuserdata/u.xcuserdatad/UserInterfaceState.xcuserstate
-rw-r--r-- 1 u u 56061 24 Sep 12:42 app.xcodeproj/project.xcworkspace/xcuserdata/u.xcuserdatad/UserInterfaceState.xcuserstate