iOS:svn 忽略 xcworkspace、xcuserdata檔案

來源:互聯網
上載者:User
        說明:     

          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版本問題,具體效果怎麼樣不確定;

--第二種方法:試了貌似不好用。

        

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.