說明:
project.xcworkspace說明:is a directory of files describing the workspace or projects. Although some of the answers here indicate it is unnecessary and should be ignored for source control, I don't agree, but it's going to be highly dependent upon how you use your environment. Generally, the contents of the project.xcworkspace directory contains the contents.xcworkspace data file, which lists the projects that are included as top-level entities in your project。
xcuserdata說明:You can safely delete the xcuserdata directories. It basically contains personal settings like breakpoints, user interface layout, open files, automatic snapshots configuration and so on。
結論:
an xcuserdata directory, which contains each user's settings (should be ignored for source code controL), and xcshareddata, which is data shared by users who share a project, and should be under source control.
in environments where you don't share workspaces, or where you use simple workspaces, you can ignore these as well, however in environments where you put related projects in the same workspace and share that configuration, you may well want to keep these. 解決辦法:
1.svn設定忽略屬性:
svn propset svn:ignore xcuserdata path/to/my/folder/MyProject.xcodeproj
說明:If you want to ignore a directory files, you need to svn propset svn:ignore files on its PARENT directory, not the directory itself.
# your directory structure is this:# workingCopy# workingCopy/parent# workingCopy/parent/subfolder# to ignore subfolder do this:svn propset svn:ignore subfolder workingCopy/parent
或者方式2:
1.cd ~/工程目錄/工程名字.xcodeproj/project.xcworkspace/xcuserdata/使用者名稱.xcuserdatad2.svn rm --force UserInterfaceState.xcuserstate [如果svn命令不能執行,請安裝xcode中的命令列工具或用Spotlight尋找svn所在] svn update [可能需要] svn commit -m "忽略該死的UserInterfaceState.xcuserstate"3.export EDITOR=nano [注釋:這是bash下]4.svn propedit svn:ignore . [注意後面有個點號,代表本目錄]5.第4步執行完了會彈出nano編輯介面,複製粘貼UserInterfaceState.xcuserstate後按Ctrl+X輸入Y儲存即可.6.輸入svn status就發現不顯示UserInterfaceState.xcuserstate了.證明修改成功.
2.修改設定檔:
global-ignores = *.o *.lo *.la .*.rej *.rej .*~ *~ .#* .DS_Store *~.nib *.mode* *.pbxuser CVS _*.java *.perspective .LSOverride *.xcuserdatad
備忘:
--第一種方法:提示svn版本問題,具體效果怎麼樣不確定;
--第二種方法:試了貌似不好用。