git推送时忽略pod文件和scheme改动

忽略scheme改动

通过Edit Scheme进入,取消勾选Shared


2222.jpg

忽略pod文件

多人开发时,因为cocoapod版本问题,所以隐藏pod文件,避免每次都要推送pod文件,操作如下
首先打开sourcetree的偏好设置,如图


111.jpg

在文件中复制如下代码即可:

*~
.DS_Store
## Build generated
build/
DerivedData/

## Various settings
*.pbxuser
!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/
#
# Add this line if you want to avoid checking in source code from the Xcode workspace
#*.xcworkspace

# 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/**/*.png
fastlane/test_output

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

iOSInjectionProject/
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 主流的依赖管理有三大开源库:最老牌的 CocoaPods, 新秀 Carthage, 官方的 Swift Pack...
    seedante阅读 4,236评论 0 11
  • iOS开发过程中经常使用到Cocoapods进行第三方库管理,而第三方库可能存在大文件,这个时候我们使用git是无...
    MMOTE阅读 1,621评论 1 1
  • 因为要结局swift3.0中引用snapKit的问题,看到一篇介绍Xcode8,swift3变化的文章,觉得很详细...
    uniapp阅读 4,526评论 0 12
  • 1. 安装 git 不同系统下 git 的安装 Mac上可以在终端上输入: git --version 来查看gi...
    学生陈希阅读 1,672评论 0 4
  • CocoaPods操作手册 本文档介绍了啥? 为什么要使用CocoaPods? 如何安装CocoaPods? Po...
    风小钻阅读 7,656评论 1 10