You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Gitignore API fetches `.gitignore` templates that can be used to ignore files and directories.
versions
fpt
ghes
ghae
ghec
*
*
*
*
topics
API
miniTocMaxHeadingLevel
3
redirect_from
/rest/reference/gitignore
About the Gitignore API
When you create a new repository on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} via the API, you can specify a .gitignore template to apply to the repository upon creation. The .gitignore templates API lists and fetches templates from the {% data variables.product.product_name %} .gitignore repository.
Custom media types for gitignore
You can use this custom media type when getting a gitignore template.