私はディレクトリのカップルをホワイトリストに登録したいとファイル:どのバージョン管理ソフトウェアでディレクトリをホワイトリストに登録できますか?
/app
/config
/db
Gemfile
A行く-にバージョン管理、git
、ディレクトリを追跡することはできません:
# .gitignore:
* # ignore all: suppose I prefer whitelisting
# but not the following things:
!/app/*
!/config/*
!/db/*
!Gemfile
は動作しません。 gitはGemfile
しか見ることができません。
どのバージョン管理ソフトウェアでもディレクトリやファイルをホワイトリストに登録できますか?
編集1
https://stackoverflow.com/a/8025106/788700を適用しようとすると:
# Ignore everything:
*
# Don't ignore directories, so we can recurse into them:
!*/
# Don't ignore these dirs:
!app/*
!config/*
!db/*
# Don't ignore .gitignore and Gemfile:
!.gitignore
!Gemfile
- app/
、config/
とdb/
でのdirsを追跡することはありません。
編集2:上記の回答からa commentを使用して
解決:
# Ignore everything:
*
# Don't ignore directories, so we can recurse into them:
!*/
# Don't ignore these dirs:
!app/*
!app/**/*
!config/*
!config/**/*
!db/*
!db/**/*
# Don't ignore .gitignore and Gemfile:
!.gitignore
!Gemfile
が動作しているようです。
これは明らかではないGit以外のバージョン管理システムについてあなたの前提は正しくありません; Gitはこれを許可しますが、ファイルを制御するディレクトリを無視しなければなりません。後続のパターンがある場合でも、Gitは無視されたディレクトリに降下しないからです。 –
@CharlesBailey:すべての子ディレクトリを含むすべてのディレクトリを無視しても機能しますが、私の観点からは使用できません(子ディレクトリのリストが多く変更されるため)。私は、ディレクトリをホワイトリストにすることを「再帰的に」可能にする任意のソリューションを探しています。 – Adobe
人間の言葉で「ホワイトリスト」とは何ですか? –