美文网首页
git ingore 忽略UserInterfaceState.

git ingore 忽略UserInterfaceState.

作者: 三月木头 | 来源:发表于2020-06-03 02:24 被阅读0次

项目开发中,经常遇见xcuserstate 隔几秒就会变化的问题,由于这个文件包存放的数据并不重要,只是一些GUI状态,比如窗口位置,打开的标签页,在项目检查等展开的节点、 简单地调整大小的Xcode窗口将这个文件来改变和修改您的源代码控制系统进行标记。

首先我们确定git文件下面是否有 .ignore文件,(command+shift+. 显示隐藏文件)

截屏2020-06-03 上午2.22.16.png

点开ignore文件,拷贝下面信息进去

# Xcode
.DS_Store
*/.DS_Store
*.xcuserstate
project.xcworkspace
xcuserdata
UserInterfaceState.xcuserstate
project.xcworkspace/
xcuserdata/
UserInterface.xcuserstate

*/build/*
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
profile
*.moved-aside
DerivedData
.idea/
*.hmap
*.xccheckout

#CocoaPods
Pods
!Podfile
!Podfile.lock
!Manifest.lock

最后在终端进行操作下面命令即可

git rm --cached [YourProjectName].xcworkspace/xcuserdata/[YourUsername].xcuserdatad/UserInterfaceState.xcuserstate
git commit -m "Removed file that shouldn't be tracked"
git push

如果未生效,退出xcode重启一下试试。

有点蛋疼的是:不同分支都要进行一次忽略,不同机器都要进行一次忽略。

相关文章

网友评论

      本文标题:git ingore 忽略UserInterfaceState.

      本文链接:https://www.haomeiwen.com/subject/rvwmzhtx.html