git for Xcode 過濾文件.gitignore

Mac ox 系統下,部分文件默認為隱藏,所以創建git倉庫里的文件將不可見,可通過以下終端命令行實現 顯示&隱藏

defaults write com.apple.finder AppleShowAllFiles -bool true 顯示文件

defaults write com.apple.finder AppleShowAllFiles -bool false 隱藏文件

.gitignore文件的作用 :告訴Git哪些文件不需要添加到版本管理中。

創建方式:終端相應的操作目錄下執行 echo -e "....."> .gitignore

iOS開發一般通用如下操作 (復制粘貼即可):

echo -e "# Xcode

#

# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## Build generated

build/

DerivedData

## Various settings

*.pbxuser

!default.pbxuser

*.mode1v3

!default.mode1v3

*.mode2v3

!default.mode2v3

*.perspectivev3

!default.perspectivev3

xcuserdata

## Other

*.xccheckout

*.moved-aside

*.xcuserstate

*.xcscmblueprint

*.xcscheme

## Obj-C/Swift specific

*.hmap

*.ipa

# 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://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md

fastlane/report.xml

fastlane/screenshots"> .gitignore

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容

  • 1.在項目的工程的路徑下,vim .gitignore文件。 2.在ignore文件中,編輯一下的內容。生成ign...
    lixiaoshuai閱讀 369評論 1 0
  • 以GitHub為遠程倉庫 首先創建你的github賬號, 添加SSH 生成SSH 1.打開終端 ssh-keyge...
    香克斯_4e59閱讀 507評論 0 0
  • 項目組件化、平臺化是技術公司的共同目標,越來越多的技術公司推崇使用pod管理第三方庫以及私有組件,一方面使項目架構...
    swu_luo閱讀 22,282評論 0 39
  • 多人項目中提交代碼時,很多用戶信息是不需要上傳,可以保證代碼提交最整潔。 git中有一個非常牛的文件(.gitig...
    尋雨的人閱讀 452評論 0 1
  • 就在風吹動的那一刻,昨夜結束了 他們的戀情也結束了 猶然記得那是三十年前的夜晚 男孩在樓下等女孩的消息 可是就在昨...
    為你點一杯陽春面閱讀 181評論 0 1