| 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 |
|
||||||
| versions |
|
||||||
| shortTitle | Create a template repo | ||||||
| category |
|
{% data reusables.repositories.about-template-repositories %}
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 %}
- Select Template repository.