美文网首页
Git - 忽略Xcode工程中UserInterfaceSta

Git - 忽略Xcode工程中UserInterfaceSta

作者: 阿姣_0405 | 来源:发表于2018-11-07 20:50 被阅读0次

    一、在同 .Git目录下创建.gitignore文件。在文件中加入如下内容:

    *.xcuserstate  
    
    project.xcworkspace  
    
    xcuserdata  
    
    UserInterfaceState.xcuserstate  
    
    project.xcworkspace/  
    
    xcuserdata/  
    
    UserInterface.xcuserstate 
    

    二、退出xcdoe, 打开终端(Terminal),进入项目目录下。

    三、在终端键入

    git rm --cached [YourProjectName].xcodeproj/project.xcworkspace/xcuserdata/[ YourUsername].xcuserdatad/UserInterfaceState.xcuserstate
    

    四、在终端键入

    git commit -m "Removed file that shouldn't be tracked"
    

    五、重新打开Xcode

    git commit
    git push
    

    相关文章

      网友评论

          本文标题:Git - 忽略Xcode工程中UserInterfaceSta

          本文链接:https://www.haomeiwen.com/subject/tgzvxqtx.html