Last active
March 7, 2019 04:19
-
-
Save philosopherdog/12510ce9e8c9a9aaf4bf30fee3249f39 to your computer and use it in GitHub Desktop.
setup gitignore_global for Xcode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
# Package.resolved | |
.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/ | |
# Carthage | |
# | |
# Add this line if you want to avoid checking in source code from Carthage dependencies. | |
# Carthage/Checkouts | |
Carthage/ | |
# 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 | |
# OS X temporary files that should never be committed | |
.DS_Store | |
*.swp | |
*.lock | |
*.xcworkspace/xcshareddata/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Installing .gitignore_global
create a hidden file called
.gitignore_global
in your the root of your user folder (if it doesn't exist) using the terminal, like this:open .gitignore_global in a text editor.
copy the above script into .gitignore_global and save the file.
setup your
.gitconfig
file to use this file by running the following command:your global gitignore file should now apply to all new repos you create.
if you have an existing repo run the following commands to force it to comply with this global gitignore file:
You will have to add and commit all files after deleting the cache.
Note if you're working with others always use a local gitignore file on your repo.