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