1# Cloning Repositories
2
3## Basic Usage
4
5```bash
6wt c <url> [--remote name]... [--own]
7```
8
9## Remote Configuration
10
11Configure remotes in `~/.config/wt/config.lua`:
12
13```lua
14return {
15 remotes = {
16 github = "git@github.com:myuser/${project}.git",
17 gitlab = "git@gitlab.com:myuser/${project}.git"
18 },
19 default_remotes = {"github"} -- or "prompt" to ask each time
20}
21```
22
23Use `--remote` to add configured remotes:
24
25```bash
26wt c https://github.com/user/repo.git --remote github --remote gitlab
27```
28
29## Contributor vs Own Mode
30
31### Contributor mode (default)
32
33For contributing to others' projects:
34
35- `origin` renamed to `upstream`
36- Selected remotes added from config
37- Pushes default branch to ALL selected remotes (creates fork copies)
38
39```bash
40wt c https://github.com/user/repo.git --remote github
41# origin → upstream
42# github remote added pointing to your fork
43```
44
45### Own mode (`--own`)
46
47For your own projects:
48
49- First selected remote becomes `origin`
50- Additional remotes added as mirrors
51- Pushes only to additional remotes, not the first
52
53```bash
54wt c git@github.com:me/my-project.git --remote github --remote gitlab --own
55# github → origin
56# gitlab added as mirror
57```
58
59