Skip to content

Latest commit

 

History

History
40 lines (30 loc) · 2.12 KB

File metadata and controls

40 lines (30 loc) · 2.12 KB
title Creating a template repository
intro You can make an existing repository a template, so you and others can generate new repositories with the same directory structure, branches, and files.
permissions Anyone with admin permissions to a repository can make the repository a template.
redirect_from
/articles/creating-a-template-repository
/github/creating-cloning-and-archiving-repositories/creating-a-template-repository
/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/creating-a-template-repository
versions
fpt ghes ghec
*
*
*
shortTitle Create a template repo
category
Create and set up a repository

About template repositories

{% data reusables.repositories.about-template-repositories %}

Creating a template repository

To create a template repository, you must create a repository, then make the repository a template. For more information about creating a repository, see AUTOTITLE.

After you make your repository a template, anyone with access to the repository can generate a new repository with the same directory structure and files as your default branch. They can also choose to include all the other branches in your repository. Branches created from a template have unrelated histories, so you cannot create pull requests or merge between the branches. For more information, see AUTOTITLE.

Note

Your template repository cannot include files stored using {% data variables.large_files.product_name_short %}.

{% ifversion fpt %}

Note

You can use a template repository as starter code for an assignment on {% data variables.product.prodname_classroom %}. For more information, see AUTOTITLE.

{% endif %}

{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %}

  1. Select Template repository.