OC project ignore file configuration

Introduction - main problems to be solved

oc projects often ignore files;
For files that have been added to version control, let gitignore take effect;
An explanation of citing others to ignore documents

1. Ignore file content in OC project
# 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 
*.moved-aside 
*.xccheckout 
*.xcscmblueprint 
## Obj-C/Swift specific 
*.hmap 
*.ipa 
*.dSYM.zip 
*.dSYM 
## Playgrounds 
timeline.xctimeline 
playground.xcworkspace 
# Swift Package Manager 
# 
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 
# Packages/ 
# Package.pins 
.build/ 
# 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/ 
*.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 
fastlane/test_output
2. The method to make gitignore take effect for the version control file (with a large number of files) that has been added

Execute the following commands in turn:

git rm -r --cached .
git add . 
git commit -m 'commit log info'

//If it is a small part of a file, you can use the following command
Git RM - R -- cached file
git add .
git commit -m 'commit log info'

3. Git ignores files without adding version control matching rules

link

Tags: git Swift xcode xml

Posted on Sun, 22 Dec 2019 07:21:29 -0800 by ClanCC