.gitattributes ファイルを使って、特定の属性で指定した「パターン」と一致するファイルをマークします。 .gitattributes ファイルでは .gitignore ファイルと同じマッチングルールが使用されます。 詳細は Git ドキュメント「PATTERN FORMAT」を参照してください。
-
.gitattributes ファイルが存在しない場合は、リポジトリのルートに .gitattributes ファイルを作成します。
-
linguist-generated属性を使って、リポジトリの言語統計に含めず、デフォルトで diff で非表示にしたいパスをマークする、またはパスのマークを解除します。たとえば、
search/index.jsonを自動生成されたファイルとしてマークするには、.gitattributes にこの行を追加します:search/index.json linguist-generated=true
参考リンク
- Linguist ドキュメント内の「生成されたコード」
- "新しいファイルの作成"

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
