IOS开发者学习笔记程序员

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

2017-12-28  本文已影响38人  _既白_

Git忽略文件配置

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

!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前面不留空格) ,具体操作如下:

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入门基础

上一篇下一篇

猜你喜欢

热点阅读