.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