最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

[已解决]git中忽略整个文件夹

Git crifan 4607浏览 0评论

对于:

想要忽略项目根目录下面的

Carthage文件夹及其下所有的子文件夹和文件

gitignore 文件夹

Git 忽略某个目录

Git 中忽略某些文件或者文件夹 | 编程珠玑

github/gitignore: A collection of useful .gitignore templates

gitignore/Xcode.gitignore at master · github/gitignore

#Mac specific
*.DS_Store
## Build generated
build/
DerivedData/
## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/
WorkspaceSettings.xcsettings
#debug related
xcdebugger
*.xcbkptlist
## Other
*.moved-aside
*.xcuserstate
UserInterfaceState.xcuserstate
## 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/
.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/
# 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/fastlane/docs/Gitignore.md
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output

[总结]

git中的.gitignore文件中,忽略整个文件夹的写法是:

yourFolderName/

比如:

上述想要忽略Carthage文件夹,则写成:

Carthage/

对应的,忽略单个文件的写法:

yourSingleFilename

转载请注明:在路上 » [已解决]git中忽略整个文件夹

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
83 queries in 0.194 seconds, using 22.15MB memory