【发布时间】:2015-04-21 07:01:54
【问题描述】:
我有一个包含 2 个子目录的主目录:
- 1个iOS项目
- 1 个轨道项目
如何在主目录中只有一个 gitignore 的情况下忽略这两个 gitignore:
*.rbc
capybara-*.html
.rspec
/log
/tmp
/db/*.sqlite3
/db/*.sqlite3-journal
/public/system
/coverage/
/spec/tmp
**.orig
rerun.txt
pickle-email-*.html
## Environment normalisation:
/.bundle
/vendor/bundle
# these should all be checked in to normalise the environment:
# Gemfile.lock, .ruby-version, .ruby-gemset
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
.rvmrc
# if using bower-rails ignore default bower_components path bower.json files
/vendor/assets/bower_components
*.bowerrc
bower.json
# Ignore pow environment settings
.powenv
# sublime text
*.sublime-*
# Xcode
.DS_Store
*/build/*
*.pbxuser
!default.pbxuser
*.mode*
!default.mode*
*.perspectivev3
!default.perspectivev3
xcuserdata
profile
*.moved-aside
DerivedData
.idea/
*.hmap
*.xcworkspace
*.xcuserdata
#CocoaPods
Pods/
Podfile.lock
但它似乎并没有很好地忽略我的配置,我想避免这种情况:
# Xcode
mystore-ios/.DS_Store
mystore-ios/*/build/*
mystore-ios/*.pbxuser
mystore-ios/!default.pbxuser
mystore-ios/*.mode*
mystore-ios/!default.mode*
mystore-ios/*.perspectivev3
mystore-ios/!default.perspectivev3
mystore-ios/xcuserdata
mystore-ios/profile
我该怎么办?
【问题讨论】:
-
为什么不在每个项目文件夹中放置一个 .gitignore?
-
子目录可以使用通配符这里有回答stackoverflow.com/questions/2545602/git-ignore-sub-folders
标签: ruby-on-rails xcode git gitignore