Cloning Repositories
Basic Usage
wt c <url> [--remote name]... [--own]
Remote Configuration
Configure remotes in ~/.config/wt/config.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:
wt c https://github.com/user/repo.git --remote github --remote gitlab
Contributor vs Own Mode
Contributor mode (default)
For contributing to others' projects:
originrenamed toupstream- Selected remotes added from config
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
wt c git@github.com:me/my-project.git --remote github --remote gitlab --own
# github → origin
# gitlab added as mirror