Skip to main content

This version of GitHub Enterprise Server was discontinued on 2024-09-25. 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 Server. For help with the upgrade, contact GitHub Enterprise support.

Creating a new repository

You can create a new repository on your personal account or any organization where you have sufficient permissions.

Tip

Owners can restrict repository creation permissions in an organization. For more information, see "Restricting repository creation in your organization."

Tip

You can also create a repository using the GitHub CLI. For more information, see "gh repo create" in the GitHub CLI documentation.

  1. In the upper-right corner of any page, select , then click New repository.

    Screenshot of a GitHub dropdown menu showing options to create new items. The menu item "New repository" is outlined in dark orange.

  2. Optionally, to create a repository with the directory structure and files of an existing repository, select the Choose a template dropdown menu and click a template repository. You'll see template repositories that are owned by you and organizations you're a member of or that you've used before. For more information, see "Creating a repository from a template."

  3. Optionally, if you chose to use a template, to include the directory structure and files from all branches in the template, and not just the default branch, select Include all branches.

  4. Use the Owner dropdown menu to select the account you want to own the repository.

    Screenshot of the owner menu for a new GitHub repository. The menu shows two options, octocat and github.

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

    Screenshot of a the first step in creating a GitHub repository. The "Repository name" field contains the text "hello-world" and is outlined in dark orange.

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

  7. If you're not using a template, there are a number of optional items you can pre-populate your repository with. If you're importing an existing repository to GitHub Enterprise Server, don't choose any of these options, as you may introduce a merge conflict. You can add or create new files using the user interface or choose to add new files using the command line later. For more information, see "Importing an external Git repository using the command line," "Adding a file to a repository," and "Addressing merge conflicts."

    • You can create a README, which is a document describing your project. For more information, see "About READMEs."
    • You can create a .gitignore file, which is a set of ignore rules. For more information, see "Ignoring files."
  8. Click Create repository.

Further reading