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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章