# Cloning Repositories

## Basic Usage

```bash
wt c <url> [--remote name]... [--own]
```

## Remote Configuration

Configure remotes in `~/.config/wt/config.lua`:

```lua
return {
    remotes = {
        github = "git@github.com:myuser/${project}.git",
        gitlab = "git@gitlab.com:myuser/${project}.git"
    },
    default_remotes = {"github"}  -- or "prompt" to ask each time
}
```

Use `--remote` to add configured remotes:

```bash
wt c https://github.com/user/repo.git --remote github --remote gitlab
```

## Contributor vs Own Mode

### Contributor mode (default)

For contributing to others' projects:

- `origin` renamed to `upstream`
- Selected remotes added from config

```bash
wt c https://github.com/user/repo.git --remote github
# origin → upstream
# github remote added pointing to your fork
```

### Own mode (`--own`)

For your own projects:

- First selected remote becomes `origin`
- Additional remotes added as mirrors

```bash
wt c git@github.com:me/my-project.git --remote github --remote gitlab --own
# github → origin
# gitlab added as mirror
```


