美文网首页Git
Git 忽略文件 UserInterfaceState.xcus

Git 忽略文件 UserInterfaceState.xcus

作者: AllenYukin | 来源:发表于2016-12-28 11:40 被阅读1534次
在项目中有一些文件需要忽略不需要跟踪提交到远端服务器,我们做如下设置。
cd worksapce      到工程根目录下
touch .gitignore  创建忽略文件
vim .gitignore    vim编辑文件
去GitHub搜索gitignore  找到对应语言的内容打开复制到vim编辑
git esc 退出 
shift + :输入 wq!保存并退出
然后找到忽略文件退回工作区在放进忽略文件中忽略
git rm --cached ProjectFolder.xcodeproj/project.xcworkspace/xcuserdata/myUserName.xcuserdatad/UserInterfaceState.xcuserstate

在把这段代码粘贴gitignore中

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

在进行add commit push到远端 之后在commit就不会再出现这个文件了

相关文章

网友评论

    本文标题:Git 忽略文件 UserInterfaceState.xcus

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