DEV Community

Cover image for How to use Repository Templates in GitHub?
souvik
souvik

Posted on

How to use Repository Templates in GitHub?

This is a fairly new to GitHub feature released in 2019. In the post i am going to speak about this new feature and how to used it.

Benefits of using repository template

  • Spend less time repeating code
  • Focus on building new things
  • Less manual configuration
  • Sharing boilerplate code across codebase

Features of repository template

  • Copy the entire repository files to a brand new repository
  • Every template has a new url endpoint called /generate
  • Share repository template through your organization or other github users

  • How to use this awesome feature

  1. On github, navigate to the main page of the repository
  2. Under the repository name click settings
  3. Select template repository

How to create a repository from a template

  1. On, navigate to the github main page of the repository
  2. Above the file list click Use this template
  3. Use the owner drop down menu and select the account you want to own the repository
  4. Type the name for your repository, and select the account you want to own the repository
  5. Choose to make the repository either public or private. Public repositories are visible to the public, while private repositories are only accessible to you, and people you share them with.
  6. Optionally, if the personal account or organization in which you're creating uses any GitHub Apps from GitHub Marketplace, select any apps you'd like to use in the repository.
  7. Click Create repository from template

Top comments (1)

Collapse
 
osde8info profile image
Clive Da

thanks i never knew this and ive been using github for years !