Gitignore for iOS
提交程式碼到git倉庫的時候,有一些檔案是多餘的,這個時候需要配置gitignore檔案來忽略多餘檔案,其實就是和.git同級目錄下配置.gitignore檔案
我的iOS專案的中.gitignore
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
## Build generated
.DS_Store
build/
DerivedData/
.idea/
## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/
## Other
*.moved-aside
*.mobileprovision
*.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/
Pods
Podfile.lock
# 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/
對於已經存在的專案配置.gitignore檔案,需要執行以下命令來使.gitignore檔案生效
git -rm -r --cache .
git add .
git commit -m "Clean up ignored files"
相關文章
- .gitignoreGit
- Git gitignoreGit
- [Git] gitignoreGit
- Vue .gitignoreVueGit
- Git忽略提交 .gitignore配置。自動生成IDE的.gitignore。解決gitignore不生效GitIDE
- gitignore by file size?Git
- gitignore語法Git
- 使得.gitignore生效Git
- .gitignore 不起作用Git
- git 的 .gitignore 配置Git
- gitignore 檔案配置Git
- 前端gitignore推薦配置前端Git
- .gitignore規則不生效Git
- 你不知道的.gitignoreGit
- .gitignore 失效問題解決Git
- git 新增 gitignore 規則無效Git
- .gitignore忽略跟蹤指定檔案Git
- Git忽略檔案.gitignore的使用Git
- git加了.gitignore檔案不生效Git
- gitignore優先順序小結Git
- IntelliJ IDEA下.gitignore配置IntelliJIdeaGit
- 為什麼說.gitignore不能忽視Git
- GitHub官方Unity的.gitignore忽略檔案GithubUnity
- .gitignore的使用---vendor是否應該追蹤Git
- Git忽略提交規則.gitignore配置總結Git
- git使用之二——.gitignore檔案詳解Git
- Git忽略提交規則 - .gitignore配置運維總結Git運維
- git的gitignore檔案排除資料夾和檔案Git
- Git 忽略規則 gitignore 配置建議, 拯救強迫症Git
- .gitignore檔案配置:Altium Designer工程檔案型別Git型別
- 【git】透過 .gitignore 檔案來忽略特定的目錄Git
- 解決 git 忽略了不在.gitignore中的檔案的問題,不在.gitignore 中的檔案被忽略了無法提交的的問題Git
- gitignore 忽略目錄下檔案僅保留目錄形態Git
- .gitkeep是什麼? .gitignore和.gitkeep之間的區別(譯)Git
- 關於.gitignore怎麼保留子目錄的子目錄這件事Git
- 解決 idea 的.gitignore 有時不起作用的問題IdeaGit
- IDEA使用git報錯LF would be replaced by CRLF in .gitignore (moments ago)IdeaGitGo
- 日常git使用中,遇見.gitignore 配置不生效,解決辦法Git