1
0
mirror of synced 2025-12-25 11:03:37 -05:00
Files
docs/content/rest/reference/gitignore.md
Laura Coursen 8f964ea2cb GHEC version (#20947)
Co-authored-by: Matt Pollard <mattpollard@users.noreply.github.com>
Co-authored-by: Grace Park <gracepark@github.com>
Co-authored-by: Steve Guntrip <12534592+stevecat@users.noreply.github.com>
Co-authored-by: Robert Sese <sese@github.com>
Co-authored-by: Peter Bengtsson <peterbe@github.com>
Co-authored-by: Rachael Sewell <rachmari@github.com>
2021-10-15 15:41:33 -05:00

1013 B

title, intro, redirect_from, versions, topics, miniTocMaxHeadingLevel
title intro redirect_from versions topics miniTocMaxHeadingLevel
Gitignore The Gitignore API fetches `.gitignore` templates that can be used to ignore files and directories.
/v3/gitignore
fpt ghes ghae ghec
* * * *
API
3

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.

application/vnd.github.VERSION.raw

For more information, see "Media types."

{% include rest_operations_at_current_path %}