Mac ox 系統(tǒng)下,部分文件默認為隱藏,所以創(chuàng)建git倉庫里的文件將不可見,可通過以下終端命令行實現(xiàn) 顯示&隱藏
defaults write com.apple.finder AppleShowAllFiles -bool true 顯示文件
defaults write com.apple.finder AppleShowAllFiles -bool false 隱藏文件
.gitignore文件的作用 :告訴Git哪些文件不需要添加到版本管理中乔宿。
創(chuàng)建方式:終端相應的操作目錄下執(zhí)行 echo -e "....."> .gitignore
iOS開發(fā)一般通用如下操作 (復制粘貼即可):
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