# Create a repository

You need a verified email address to create a repository. To bring an existing
project from GitHub instead, see [GitHub import](https://staging.git.cafe/docs/integrations/github-sync.md).

## Create a repository in the browser

1. Open `/new`.
2. Choose an owner: your account or an organization where you can create
   repositories.
3. Enter:
   - **Name**: unique within the owner.
   - **Visibility**: **Private** (the default) or **Public**.
   - **Default branch**: `main` unless you choose another name.
   - **Description**: optional.
4. Choose **Create**.

The new repository is empty. Its page shows the commands to push an existing
project or start a new one; see [Git access](https://staging.git.cafe/docs/getting-started/git-access.md).
There are no README, license or `.gitignore` templates.

## Create a repository from the CLI

```sh
cafe repo create my-app --private --clone
```

`--org <slug>` creates it in an organization, `--default-branch` sets the
initial branch name, and `--clone` clones it into a new directory.

## Fork a repository

A fork is your own copy of another repository, linked to its parent so you can
propose changes back with a [pull request](https://staging.git.cafe/docs/pull-requests/open.md#open-a-pull-request-from-a-fork).

1. Open the repository and choose **Fork**.
2. Choose the owner and, optionally, a new name.
3. Choose **Create fork**.

Or run `cafe repo fork owner/repo --clone`. Forking a private organization
repository requires the organization to allow it.

To bring your fork's default branch up to date with its parent, run
`cafe repo sync`; `cafe repo compare-upstream` shows how far ahead or behind
it is.

## Next steps

- Invite people in [access settings](https://staging.git.cafe/docs/repositories/repository-access.md).
- Protect branches with [rulesets](https://staging.git.cafe/docs/repositories/repository-rulesets.md).
- Change the description, visibility or default branch in
  [repository settings](https://staging.git.cafe/docs/repositories/repository-settings.md).
