{"meta":{"title":"Customizing how changed files appear on GitHub","intro":"To keep certain files from displaying in diffs by default, or counting toward the repository language, you can mark them with the linguist-generated attribute in a .gitattributes file.","product":"Repositories","breadcrumbs":[{"href":"/en/repositories","title":"Repositories"},{"href":"/en/repositories/working-with-files","title":"Work with files"},{"href":"/en/repositories/working-with-files/managing-files","title":"Managing files"},{"href":"/en/repositories/working-with-files/managing-files/customizing-how-changed-files-appear-on-github","title":"How changed files appear"}],"documentType":"article"},"body":"# Customizing how changed files appear on GitHub\n\nTo keep certain files from displaying in diffs by default, or counting toward the repository language, you can mark them with the linguist-generated attribute in a .gitattributes file.\n\nUse a *.gitattributes* file to mark files that match a given \"pattern\" with the specified attributes. A *.gitattributes* file uses the same rules for matching as *.gitignore* files. For more information, see [PATTERN FORMAT](https://www.git-scm.com/docs/gitignore#_pattern_format) in the Git documentation.\n\n1. Unless the *.gitattributes* file already exists, create a *.gitattributes* file in the root of the repository.\n2. Use the `linguist-generated` attribute to mark or unmark paths that you would like to be ignored for the repository's language statistics and hidden by default in diffs.\n\n   For example, to mark `search/index.json` as a generated file, add this line to *.gitattributes*:\n\n   ```text\n   search/index.json linguist-generated\n   ```\n\n   To unmark a file that would generally be considered *generated*, add this line to *.gitattributes*:\n\n   ```text\n   bootstrap.min.css -linguist-generated\n   ```\n\n## Further reading\n\n* [Generated code](https://github.com/github-linguist/linguist/blob/main/docs/overrides.md#generated-code) in the Linguist documentation\n* [Creating new files](/en/repositories/working-with-files/managing-files/creating-new-files)"}