1# Converting Existing Repos
2
3```bash
4wt init [--dry-run] [-y]
5```
6
7Converts a standard git repository to bare worktree structure.
8
9## Options
10
11| Flag | Purpose |
12|------|---------|
13| `--dry-run` | Show what would happen without making changes |
14| `-y` | Skip confirmation prompt |
15
16## What It Does
17
181. Moves `.git/` to `.bare/`
192. Creates `.git` file pointing to `.bare/`
203. Creates worktree for current branch
214. Copies untracked/ignored files to worktree (preserves `.env`, build artifacts, etc.)
225. Removes orphaned files from project root
23
24## Example
25
26```bash
27cd ~/repos/existing-project
28wt init --dry-run # preview changes
29wt init -y # convert without prompting
30```
31
32After conversion:
33
34```
35existing-project/
36├── .bare/ # was .git/
37├── .git # file pointing to .bare/
38└── main/ # worktree with your files
39```