Skip to content

Latest commit

 

History

History
61 lines (42 loc) · 1.16 KB

File metadata and controls

61 lines (42 loc) · 1.16 KB
title Gitignore

Gitignore

{:toc}

When you create a new {{ site.data.variables.product.product_name }} repository 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 {{ site.data.variables.product.product_name }} .gitignore repository.

Listing available templates

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

GET /gitignore/templates

Response

<%= headers 200 %> <%= json(:templates) %>

Get a single template

The API also allows fetching the source of a single template.

GET /gitignore/templates/C

Response

<%= headers 200 %> <%= json(:template) %>

Use the raw media type to get the raw contents.

<%= headers 200 %>

# Object files
*.o

# Libraries
*.lib
*.a

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

# Executables
*.exe
*.out
*.app