Skip to main content

Get a gitignore template

The API also allows fetching the source of a single template. Use the raw [media type](https://docs.github.com/[email protected]/rest/overview/media-types/) to get the raw contents.

GET/gitignore/templates/{name}
Source
github-v3-rest.json
Revision
f5f067c1e6f6
Active snapshot
85e53e3d0d65

Request

Path Parameters
name string
required

Responses

application/json Gitignore Template object

Response

name string
required

Example: C

source string
required
Example:
# Object files
*.o

# Libraries
*.lib
*.a

# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib

# Executables
*.exe
*.out
*.app

Not modified