# Quickstart

Create an account, push your first repository and open a pull request.

## 1. Create an account

Open [sign up](https://staging.git.cafe/auth/sign-up) and choose a username, email address and
password, or choose **Sync with GitHub** to
[sign up with GitHub](https://staging.git.cafe/docs/integrations/github-sync.md#create-an-account-with-github).
Open the link in the verification email: you need a verified address to create
repositories.

## 2. Install the CLI and sign in

The `cafe` CLI handles sign-in and Git credentials for you. It needs
[Bun](https://bun.sh) 1.2 or newer.

```sh
bun install -g @gitcafe/cli
cafe auth login
cafe auth http setup
```

`cafe auth login` opens your browser to [approve the
sign-in](https://staging.git.cafe/docs/account/device-authorization.md); `cafe auth http setup` lets Git
use that login for HTTPS. To use SSH instead, add an
[SSH key](https://staging.git.cafe/docs/account/ssh-keys.md). See [Git access](https://staging.git.cafe/docs/getting-started/git-access.md) for both.

## 3. Create a repository

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

Or open `/new` in the browser; see [create a repository](https://staging.git.cafe/docs/repositories/repository-create.md).

## 4. Push your code

From your project directory:

```sh
git init -b main
git add .
git commit -m "First commit"
git remote add origin https://git.cafe/<you>/my-app
git push -u origin main
```

## 5. Open a pull request

```sh
git switch -c add-readme
echo "# my-app" > README.md
git add README.md
git commit -m "Add a README"
git push -u origin add-readme
cafe pr create --title "Add a README"
```

Open the pull request on GitCafe to [review](https://staging.git.cafe/docs/pull-requests/review.md) and
[merge](https://staging.git.cafe/docs/pull-requests/merge.md) it.

## Next steps

- Bring existing projects over with [GitHub import](https://staging.git.cafe/docs/integrations/github-sync.md).
- Invite collaborators in [repository access](https://staging.git.cafe/docs/repositories/repository-access.md),
  or set up an [organization](https://staging.git.cafe/docs/organizations/organizations.md).
- Protect `main` with a [ruleset](https://staging.git.cafe/docs/repositories/repository-rulesets.md).
