This version of GitHub Enterprise will be discontinued on This version of GitHub Enterprise was discontinued on 2020-08-20. No patch releases will be made, even for critical security issues. For better performance, improved security, and new features, upgrade to the latest version of GitHub Enterprise. For help with the upgrade, contact GitHub Enterprise support.

Article version: Enterprise Server 2.18

Creating a repository from a template

You can generate a new repository with the same directory structure and files as an existing repository.

Anyone with read permissions to a template repository can create a repository from that template. For more information, see "Creating a template repository."

Creating a repository from a template is similar to forking a repository, but there are important differences:

  • A new fork includes the entire commit history of the parent repository, while a repository created from a template starts with a single commit.
  • Commits to a fork don't appear in your contributions graph, while commits to a repository created from a template do appear in your contribution graph.
  • A fork can be a temporary way to contribute code to an existing project, while creating a repository from a template starts a new project quickly.

For more information about forks, see "About forks."

  1. On GitHub Enterprise, navigate to the main page of the repository.

  2. Above the file list, click Use this template.

    Use this template button

  3. Use the Owner drop-down menu, and select the account you want to own the repository.

    Owner drop-down menu

  4. Type a name for your repository, and an optional description.

    Create repository field

  5. Choose a repository visibility. For more information, see "About repository visibility."

    Radio buttons to select repository visibility

  6. Click Create repository from template.

Ask a human

Can't find what you're looking for?

Contact us