Skip to content

Commit dfaa1d1

Browse files
committed
chore: update CLAUDE.md
1 parent 6dfcf45 commit dfaa1d1

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

CLAUDE.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,34 @@ Submersion is a Flutter dive logging application for scuba divers. It provides d
2020
| ------ | --------- |
2121
| [FEATURE_ROADMAP.md](FEATURE_ROADMAP.md) | Comprehensive roadmap with all features by phase (v1.0, v1.5, v2.0, v3.0), database schemas, and dependencies |
2222

23+
## Git Worktrees
24+
25+
Use git worktrees for all parallel work. When reviewing or fixing PRs, each PR
26+
should get its own worktree so multiple Claude Code sessions can run simultaneously
27+
without interfering with each other.
28+
29+
Launch parallel sessions with:
30+
```
31+
claude -w pr-<number>
32+
```
33+
34+
### Worktree initialization
35+
36+
After creating a new worktree, always run these steps before doing anything else:
37+
38+
1. `git submodule update --init --recursive` — worktrees do not inherit
39+
initialized submodules from the main working tree; libdivecomputer and any
40+
other submodules must be explicitly initialized.
41+
2. `flutter pub get` — worktrees have their own `.dart_tool` and `build`
42+
directories, and the native platform channel builds (libdivecomputer) need
43+
their own build artifacts per worktree.
44+
45+
### Cleanup
46+
47+
Add `.claude/worktrees/` to `.gitignore`. When exiting a worktree session,
48+
Claude Code will prompt to keep or remove the worktree if changes exist.
49+
Periodically run `git worktree prune` to clean up stale references.
50+
2351
## Quick Start
2452

2553
```bash

0 commit comments

Comments
 (0)