1
0
mirror of synced 2025-12-23 21:07:12 -05:00

Unify language in the API docs for gitignore operations (#32865)

This commit is contained in:
Sarah Edwards
2022-12-09 09:17:38 -08:00
committed by GitHub
parent 45203659a0
commit fa000d3df0

View File

@@ -1,6 +1,6 @@
---
title: Gitignore
intro: The Gitignore API fetches `.gitignore` templates that can be used to ignore files and directories.
intro: Use the REST API to get `.gitignore` templates that can be used to ignore files and directories.
versions:
fpt: '*'
ghes: '*'
@@ -13,14 +13,8 @@ redirect_from:
- /rest/reference/gitignore
---
## About the Gitignore API
## About gitignore
When you create a new repository on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %} via the API, you can specify a [.gitignore template](/github/getting-started-with-github/ignoring-files) to apply to the repository upon creation. The .gitignore templates API lists and fetches templates from the {% data variables.product.product_name %} [.gitignore repository](https://github.com/github/gitignore).
When you create a new repository on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %} via the API, you can specify a [.gitignore template](/github/getting-started-with-github/ignoring-files) to apply to the repository upon creation. You can use the REST API to get .gitignore templates from the {% data variables.product.product_name %} [.gitignore repository](https://github.com/github/gitignore).
### Custom media types for gitignore
You can use this custom media type when getting a gitignore template.
application/vnd.github.raw
For more information, see "[Media types](/rest/overview/media-types)."
You can use the `application/vnd.github.raw` custom media type when getting a gitignore template. For more information, see "[Media types](/rest/overview/media-types)."