在xcode中使用git管理项目的技巧:

在多人协作开发的时候,每个开发者都会在项目中的某个目录生成一个 UserInterfaceState.xcuserstate 文件,这个文件大概每5s会刷新一次,所以在push的时候总会提示有未提交的更改。

在项目的 .xcodeproj包里的有一个 UserInterfaceState.xcuserstate文件;如果使用了workspace来管理项目,也需要让git对workspace包里的 UserInterfaceState.xcuserstate文件不跟踪。

 

找到你项目中所有的 .xcuserstate文件,使用以下命令即可,记得每个成员都需要执行以下命令。

下次在提交的时候,就可以看到这个文件的状态为 ? ,不要勾选。

& git rm --cached 这里支持全局路径/UserInterfaceState.xcuserstate
& git commit -m "Removed file that shouldn't be tracked"

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-08
  • 2021-08-14
  • 2021-06-07
  • 2021-09-29
猜你喜欢
  • 2021-11-16
  • 2022-12-23
  • 2022-12-23
  • 2021-09-19
  • 2022-01-11
相关资源
相似解决方案