git rm --cached 工程的名字.xcodeproj/project.xcworkspace/xcuserdata/你的用户名.xcuserdatad/UserInterfaceState.xcuserstate git commit -m "Removed file that shouldn't be tracked" 参考地址 stackoverflow里找到这个方法 git clean -f -d 避免已经忽略的文件还显示 参考地址1