Get all gitignore templates

List all templates available to pass as an option when creating a repository.

octokit.gitignore.getAllTemplates();

Parameters

This endpoint has no parameters

See also: GitHub Developer Guide documentation.

Get a gitignore template

The API also allows fetching the source of a single template. Use the raw media type to get the raw contents.

octokit.gitignore.getTemplate({
name,
});

Parameters

namerequireddescription
nameyes

See also: GitHub Developer Guide documentation.