git .gitignore 文件 解决二进制文件冲突问题


.gitignore  主要是添加 忽略文件 。最近团队开发经常出现 

UserInterfaceState.xcuserstate 冲突,打开发现是二进制文件 ,没法解决冲突。

只好 rm -rf 之,次数多了真烦啦。

一劳永逸解决方案:

1,找到 .gitignore 添加 UserInterfaceState.xcuserstate 不纳入版本管理

2, 移除git 已经跟踪的UserInterfaceState.xcuserstate  ,启用.gitignore 忽略对应文件

      1),git rm --cached YourProjectFolderName.xcodeproj/project.xcworkspace/xcuserdata/myUserName.xcuserdatad/UserInterfaceState.xcuserstate

       2),git commit -m "Removed file that shouldn't be tracked"

       3),git clean -f -d

http://stackoverflow.com/questions/6564257/cant-ignore-userinterfacestate-xcuserstate

推荐个 iOS 常用的 gist  :https://gist.github.com/mmorey/6931793

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM