美文网首页IOS开发者学习笔记程序员
IOS开发 Git 和 SVN 忽略文件配置

IOS开发 Git 和 SVN 忽略文件配置

作者: _既白_ | 来源:发表于2017-12-28 19:15 被阅读38次

Git忽略文件配置

从里 开源的忽略文件资源 下载一份,从中gitignore.master文件中找到Objective-C.gitignore 或者 Swift.gitignore 文件。然后使用Vim编辑器修改Objective-C.gitignore 或者 Swift.gitignore 文件中需要忽略的内容,比如想要忽略pod相关内容。

  • Objective-C.gitignore文件拖到需要忽略的工程根目录下,然后使用 vim 【Objective-C.gitignore 文件路径】 ,打开需要修改的文件。
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/

## Other
*.moved-aside
*.xccheckout
*.xcscmblueprint

## Obj-C/Swift specific
*.hmap
*.ipa
*.dSYM.zip
*.dSYM

# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# Pods/

# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts

Carthage/Build

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/#source-control

fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output

# Code Injection
#
# After new code Injection tools there's a generated folder /iOSInjectionProject
# https://github.com/johnno1962/injectionforxcode

iOSInjectionProject/

Objective-C.gitignore文件中# Pods/是默认不忽略的,如果想要或略pod的相关内容,将注释去掉(删掉Pod前面的#并且Pod前面不留空格) ,具体操作如下:

  • 此时终端处于非编辑模式,使用shift + i让终端处于可编辑模式,此时删除#与空格

  • 删除完之后,ESC退出编辑模式,进入非编辑模式,执行shift + :命令,进入指令对话模式,输入qw命令,保存内容 ,并退出。

  • 修改Objective-C.gitignore文件名称为.gitignore,如果使用重命名方式修改,系统会提示你没有权限修改。所以我们要使用终端去修改 cdObjective-C.gitignore所在的根目录下,在终端执行mv Objective-C.gitignore .gitignore命令。

  • 此时我们的要做的已经完成,.gitignore文件被隐藏掉,在终端查看.gitignore文件是否存在,cd.gitignore文件所在的根目录,在执行 ls -a 命令,终端会显示所有被隐藏的文件,如果.gitignore文件存在,说明我们操作成功了。

SVN忽略文件配置

以CornerStone 为例子,preferences ->Subversion ->Genneral ,不要勾选Use default global ignores ,我们使用自定以忽略。


*.lo,*.la,*.al,.libs,*.so,*.so.[0-9]*,*.pyc,*.pyo,*.rej,*~,#*#,.#*,.*.swp,.DS_Store,build/,DerivedData/,*.pbxuser,!default.pbxuser,*.mode1v3,!default.mode1v3,*.mode2v3,!default.mode2v3,*.perspectivev3,!default.perspectivev3,xcuserdata/,*.moved-aside,*.xccheckout,*.xcscmblueprint,*.hmap,*.ipa,*.dSYM.zip,*.dSYM,Pods/,Carthage/Build,fastlane/report.xml,fastlane/Preview.html,fastlane/screenshots,fastlane/test_output,iOSInjectionProject/
SVN忽略文件配置

Vim入门基础

相关文章

  • IOS开发 Git 和 SVN 忽略文件配置

    Git忽略文件配置 从里 开源的忽略文件资源 下载一份,从中gitignore.master文件中找到Object...

  • sourcetree 无法忽略.xcuserstate的两种解决

    iOS开发过程中,代码管理常用的就是SVN 和 Git 两者都会有自己的设置忽略文件的方法,SVN设置很简单,直接...

  • sourcetree 无法忽略.xcuserstate的两种解决

    iOS开发过程中,代码管理常用的就是SVN 和 Git 两者都会有自己的设置忽略文件的方法,SVN设置很简单,直...

  • SVN如何配置忽略文件和目录

    1. 介绍 以前开发版本控制很早就换成了Git,最近换了一份工作,使用的是SVN,由于配置忽略文件和Git差距太大...

  • xcode中的.gitignore

    iOS合作开发中使用git时,忽略文件的配置。 在.git同目录下创建.gitignore: touch...

  • git文件忽略

    附录:git文件忽略操作参考git官方各大IDE、框架忽略集合 1、从svn转到git,有将项目中的svn文件删除...

  • 给工程添加忽略文件.gitignore

    目前iOS 项目 主要忽略 临时文件、配置文件、或者生成文件等,在不同开发端这些文件会大有不同,如果 git ad...

  • SVN介绍

    参考 Android Studio SVN配置忽略文件

  • svn ignore

    [转]mac OS 下配置SVN忽略文件 svn ignore 的用法(忽略文件及目录)http://blog.c...

  • 无标题文章

    # SVN 代码提交规范 --- [TOC] ## 1. 提交前配置忽略文件 首次提交前需要先配置忽略文件,防止将...

网友评论

    本文标题:IOS开发 Git 和 SVN 忽略文件配置

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