Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
.gitignoredata/*を実行して実行するgit clean -fdと、データ フォルダーとそのすべてのコンテンツ ファイルが削除されます。
data/*
git clean -fd
私が望むのは、すべての無視されたファイルを除外しながら、git リポジトリ内のすべての未修正のファイルを削除することです (つまり、gitignored ファイルを削除しないでください)。どうすればよいですか?
フラグが指定されていない限り、Git は通常、無視されたファイルを消去しません-xが、奇妙に構成すると消去されます ( folder/*)。
-x
folder/*
@VonC が指摘したように、 -file を変更して、その内容 ( ) ではなく.gitignoreディレクトリ ( ) を無視する必要があります。data/data/*
.gitignore
data/
微妙な違いですが、git にとっては重要です。