.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

 

相关文章:

  • 2021-08-08
  • 2021-06-07
  • 2021-10-26
  • 2022-12-23
  • 2021-12-24
  • 2022-12-23
  • 2021-06-17
猜你喜欢
  • 2021-08-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-27
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案