XCode 开发去除 UserInterfaceState.xcuserstate 文件为版本控制带来的困扰

原理和操作步骤见如下转载的两篇文章,

我所使用的 svn 客户端软件是 Mac 下面的 Versions.app v1.06

这个版本包含一个多人开发的bug

bug 的解决方案见我之前转载的两篇文章~

另外就是如本文转载的第一篇文章,我也深受 UserInterfaceState.xcuserstate 文件频繁更新带来的困扰,

要免除该困扰,可在 Versions 的配置文件 ~/.subversion/config 中忽略对 xcuserstate 类型文件的版本控制。

另外,Versions 的配置文件是处于隐藏目录的,可在 Finder 中通过 cmd + shift + g 直接跳到隐藏目录~

************************ 分割线 ***************************

文章标题:

摆脱 UserInterfaceState.xcuserstate给Xcode 版本控制(git)带来的困扰

转载自:http://alexrezit.42qu.com/10280223

今天在Xcode中Commit的时候UserInterfaceState.xcuserstate这个文件几秒钟更新一次, 搅得人不得安宁, 用.gitignore无效. 于是, 在终端中输入:

$ git rm --cached iLedger.xcodeproj/project.xcworkspace/xcuserdata/Alex.xcuserdatad/UserInterfaceState.xcuserstate
$ git commit -m "Removed the stupid strange file that shouldn't be tracked"
$ git push
搞定!

************************ 分割线 ***************************

文章标题:

XCode SVN

转载自:http://renxiangzyq.iteye.com/blog/850762

  1. Create the project in XCODE.
  2. Setup subversion in XCODE and select the subversion repository for this project.
  3. Use Xcode SCM > Repository and click on the IMPORT icon. This will move the local copy to the subversion repository.
  4. Now delete your local copy (or move it to another location just in case).
  5. Finally CHECKOUT the project from subversion (this will create the subversion .svn folders, …).
  6. Reselect the subversion repository for this project.
  7. Commit the entire project.

第一步,配置Subversion
Xcode中SVN使用时需要配置Subversion。Leopard中自带了SVN,但Xcode的项目文件中,并不是所有文件都适于加入SVN中进 行管理,比如编译后的文件和编译过程中产生的文件,这些文件不属于源代码,应该告诉svn忽略掉,方法:编辑~/.subversion/config文 件
1.找到global-ignores一行,去掉注释,编辑成
global-ignores=build*~.nib*.so*.pbxuser*.mode*.perspective*
Xcode项目文件中有些文件是文本文件,需要告诉SVN,因为SVN能更好地管理文本文件(谁用谁知道)
2.找到enable-auto-props=yes把注释去掉,在[auto-props]Section声明以下文本文件
*.mode*=svn:mime-type=text/X-xcode
*.pbxuser=svn:mime-type=text/X-xcode
*.perspective*=svn:mime-type=text/X-xcode
*.pbxproj=svn:mime-type=text/X-xcode


  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值