> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/code-repository/use-harness-code/manage-repositories/create-repo.md).

# Create repositories

Repositories are where your code is stored. When developers make changes to code in a Harness Code repository, those changes are tracked with version control. Harness Code fosters collaboration and governance with code reviews, approvals, status checks, and more.

You can create repositories directly in Harness Code or [import repositories](/code-repository/use-harness-code/manage-repositories/import-repo.md) from other Git SCM providers.

### Create a repository <a href="#create-a-repository" id="create-a-repository"></a>

1. In the Harness Code module, make sure you are at the [scope](/harness-ai/use-harness-platform/platform-access-control.md#permissions-hierarchy-scopes) where you want to create the repository.

   You can create repos at the account, organization, or project scope. For example, a repo created at the account scope is available to the entire account, whereas a repo created at the project scope is limited to that project.
2. Select **Repositories**, and then select **New Repository**.
3. Enter a repository **Name** and optional **Description**.

   Repository names can't contain the following strings:

   ```
   account.
   org.
   project.
   .git
   ```
4. Harness Code repositories are initialized with a `main` branch, unless you specify a different name for the base branch. To change the base branch name, select `main` and enter a name for the base branch.
5. Select your preference for visibility (**Public** or **Private**).

{% hint style="info" %}
Public repository feature is behind the feature flag `PL_ALLOW_TO_SET_PUBLIC_ACCESS`.
{% endhint %}

6\. Optionally, you can add a \*\*License\*\*, \*\*.gitignore\*\*, or \*\*README\*\* file to your repository. 7. Select \*\*Create Repository\*\*.

### Work with repositories <a href="#work-with-repositories" id="work-with-repositories"></a>

After creating a repository, you can:

* [Clone your repository.](/code-repository/use-harness-code/collaborate-and-develop/clone-repos.md)
* Create [branches](/code-repository/use-harness-code/collaborate-and-develop/branch.md) and [tags](/code-repository/use-harness-code/collaborate-and-develop/tag.md).
* [Commit changes](/code-repository/use-harness-code/collaborate-and-develop/commit.md) and [open pull requests](/code-repository/use-harness-code/pull-requests.md).
* [Configure branch rules](/code-repository/use-harness-code/manage-repositories/rules.md) and [access control](/code-repository/new-to-harness-code/onboarding-guide.md#manage-access).
* Use Harness Code repositories in your [Harness pipelines](/code-repository/use-harness-code/run-pipelines/codebase-from-harness-code.md).
* Set up [triggers](/code-repository/use-harness-code/run-pipelines/code-triggers.md) to automatically run pipelines based on activity in your Harness Code repositories.
* [Configure webhooks](/code-repository/use-harness-code/manage-repositories/webhooks.md) to integrate your repositories with third-party applications.
