.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