---
metadata:
  - name: generator
    content: Diplodoc Platform v5.54.2
alternate:
  - https://sourcecraft.dev/portal/docs/en/sourcecraft/operations/repo-create.md
  - https://sourcecraft.dev/portal/docs/ru/sourcecraft/operations/repo-create.md
  - href: en/sourcecraft/operations/repo-create.md
    type: text/markdown
    title: Markdown version
  - href: ../../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://sourcecraft.dev/portal/docs/en/llms.txt

# Creating a repository in SourceCraft

<!-- source: en/_includes/sourcecraft/repo-description.md -->
A _repository_ is a storage containing the entire codebase of your project and information related to it. Each repository includes:
* Source code (all project files).
* <!-- source: en/_includes/sourcecraft/commit-intro.md -->
  _Commits_ are records of changes to the repository containing a description, author info, and timestamp.
  <!-- endsource: en/_includes/sourcecraft/commit-intro.md --> 

  For more information, see [Viewing the commit history in SourceCraft](https://sourcecraft.dev/portal/docs/en/sourcecraft/operations/get-commits.md).

  {% note tip %}

  <!-- source: en/_includes/sourcecraft/commit-association-intro.md -->
  SourceCraft gets the author name and email for each commit from `git`. If the email in the `git` settings matches the SourceCraft user email, the commit is automatically associated with that user in the repository, with their SourceCraft username, avatar, and profile link displayed in the commit history.

  You can have several email addresses associated with your profile, in which case commits containing these addresses will be attached to your account.
  <!-- endsource: en/_includes/sourcecraft/commit-association-intro.md --> 
  
  For more information, see [Setting up an email address for commit association in SourceCraft](https://sourcecraft.dev/portal/docs/en/sourcecraft/operations/commit-association.md).

  {% endnote %}

* _Branches_ (independent development lines).
* _Tags_ (markers for key points in the project’s history).
* [Releases](https://sourcecraft.dev/portal/docs/en/sourcecraft/concepts/releases.md), i.e., fixed versions of the project that include a specific set of changes, a tag, a description, and additional resources, such as binaries or archives, intended for users or other developers.

You can use a repository to track the progress of your project, manage different development branches, and roll back to previous code versions.

SourceCraft uses [branch policies](https://sourcecraft.dev/portal/docs/en/sourcecraft/concepts/branch-policies.md) for change management and code review, enforcement of proper naming conventions and branch and tag conditions, and protection of branches from accidental commits or direct pushes.
<!-- endsource: en/_includes/sourcecraft/repo-description.md -->

The following options are available for creating a [repository](https://sourcecraft.dev/portal/docs/en/sourcecraft/concepts/index.md#repos):
* [Blank repository](#create-empty)
* [Template repository](#create-from-template)
* [Imported repository](https://sourcecraft.dev/portal/docs/en/sourcecraft/operations/migration.md)

<iframe width="640" height="360" src="https://runtime.strm.yandex.ru/player/video/vplvzg74s2wohjlll5q6?autoplay=0&mute=0" allow="autoplay; fullscreen; picture-in-picture; encrypted-media" frameborder="0" scrolling="no"></iframe>

## Creating a blank repository {#create-empty}

1. Open the [service home page](https://sourcecraft.dev).
1. In the left-hand panel, click ![image](../../_assets/console-icons/plus.svg) **Create repository**.
1. In the window that opens, select **Blank repository**.
1. <!-- source: en/_includes/sourcecraft/repo-create-details.md -->
   Under **Your new repository details**:

   <!-- source: en/_includes/sourcecraft/repo-fork-create-details.md -->
   * In the **Owner** field, select the organization to create the repository in.
   * In the **Name** field, specify a name for the repository. 
          
     The name must be unique within the organization. The name may contain the following [ASCII characters](https://ru.wikipedia.org/wiki/ASCII): lowercase and uppercase Latin letters, numbers, commas, hyphens, and underscores.

     The address to access the repository at is displayed below the name.

   * Optionally, in the **Description** field, enter a description for the repository.
   <!-- endsource: en/_includes/sourcecraft/repo-fork-create-details.md -->
   <!-- endsource: en/_includes/sourcecraft/repo-create-details.md -->
1. <!-- source: en/_includes/sourcecraft/repo-create-visibility.md -->
   In the **Visibility** field, select the repository access type:

   <!-- source: en/_includes/sourcecraft/repo-visibility-options.md -->
   * **Public**: All internet users will be able to view the repository without authentication. Only invited users will be able to modify the repository.
   * **Internal**: Only users from the organization housing the repository will have access to view and edit the repository.
   * **Private**: Only invited users will have access to view and edit the repository.

   You can [change](https://sourcecraft.dev/portal/docs/en/sourcecraft/operations/repo-privacy.md) repository access type at any time.
   <!-- endsource: en/_includes/sourcecraft/repo-visibility-options.md -->
   <!-- endsource: en/_includes/sourcecraft/repo-create-visibility.md -->
1. Optionally, under **Configuration**, select:
    * **Initialize repository with a README**: To add the `README.md` project description file to the repository.
    * **Add .gitignore**: To add to the repository the `.gitignore` file listing the files to be ignored by [git](https://git-scm.com/).
  
      To use templates for `.gitignore`:
      * Expand the drop-down list.
      * In the search bar ![image](../../_assets/console-icons/magnifier.svg), enter the programming language or framework you want to use for development.
      * Select all suitable templates one by one.

    * **Add a license**: To add the `LICENSE` project license file to the repository.

      To use a template for `LICENSE`:
      * Expand the drop-down list.
      * In the search bar ![image](../../_assets/console-icons/magnifier.svg), enter the license name.

    * **Add a CI/CD template**: To add the `.sourcecraft/ci.yaml` CI/CD configuration file to the repository.

      To use a template for `.sourcecraft/ci.yaml`, expand the drop-down list and select the appropriate CI/CD configuration.

      For more information on CI/CD, see [Configuring CI/CD in a SourceCraft repository](https://sourcecraft.dev/portal/docs/en/sourcecraft/operations/ci-cd.md).
1. Click **Create repository**.

## Creating a repository from a template {#create-from-template}

1. Open the [service home page](https://sourcecraft.dev).
1. In the left-hand panel, click ![image](../../_assets/console-icons/plus.svg) **Create repository**.
1. In the window that opens, select **Blank repository**.
1. <!-- source: en/_includes/sourcecraft/repo-create-details.md -->
   Under **Your new repository details**:

   <!-- source: en/_includes/sourcecraft/repo-fork-create-details.md -->
   * In the **Owner** field, select the organization to create the repository in.
   * In the **Name** field, specify a name for the repository. 
          
     The name must be unique within the organization. The name may contain the following [ASCII characters](https://ru.wikipedia.org/wiki/ASCII): lowercase and uppercase Latin letters, numbers, commas, hyphens, and underscores.

     The address to access the repository at is displayed below the name.

   * Optionally, in the **Description** field, enter a description for the repository.
   <!-- endsource: en/_includes/sourcecraft/repo-fork-create-details.md -->
   <!-- endsource: en/_includes/sourcecraft/repo-create-details.md -->
1. <!-- source: en/_includes/sourcecraft/repo-create-template.md -->
   Under **Repository template**, click **Browse templates**, select suitable repository template, and click **Use template**.

   Templates contain a preinstalled [CI/CD configuration](https://sourcecraft.dev/portal/docs/en/sourcecraft/concepts/ci-cd.md) and standard project files.

   To view the template contents, click **Preview**.
   <!-- endsource: en/_includes/sourcecraft/repo-create-template.md -->
1. <!-- source: en/_includes/sourcecraft/repo-create-visibility.md -->
   In the **Visibility** field, select the repository access type:

   <!-- source: en/_includes/sourcecraft/repo-visibility-options.md -->
   * **Public**: All internet users will be able to view the repository without authentication. Only invited users will be able to modify the repository.
   * **Internal**: Only users from the organization housing the repository will have access to view and edit the repository.
   * **Private**: Only invited users will have access to view and edit the repository.

   You can [change](https://sourcecraft.dev/portal/docs/en/sourcecraft/operations/repo-privacy.md) repository access type at any time.
   <!-- endsource: en/_includes/sourcecraft/repo-visibility-options.md -->
   <!-- endsource: en/_includes/sourcecraft/repo-create-visibility.md -->
1. Click **Create repository**.

#### Useful links {#see-also}

* [Getting started with Git](https://sourcecraft.dev/portal/docs/en/sourcecraft/tutorials/quickstart-git.md)
* [SourceCraft resource relationships](https://sourcecraft.dev/portal/docs/en/sourcecraft/concepts/index.md)
* [Importing a repository](https://sourcecraft.dev/portal/docs/en/sourcecraft/operations/migration.md)
* [Suggesting changes](https://sourcecraft.dev/portal/docs/en/sourcecraft/operations/pr-create.md)
* [Creating an issue](https://sourcecraft.dev/portal/docs/en/sourcecraft/operations/issue-create.md)
* [Editing code in Code Assistant](https://sourcecraft.dev/portal/docs/en/sourcecraft/operations/code-edit.md)
* [Configuring CI/CD](https://sourcecraft.dev/portal/docs/en/sourcecraft/operations/ci-cd.md)
