`switch` docs
@worktrunk-bot this part:
Upstream tracking: Branches created with --create have no upstream tracking configured. This prevents accidental pushes to the wrong branch — for example, --base origin/main would otherwise make git push target main. Use git push -u origin <branch> to set up tracking as needed.
Without --create, switching to a remote branch (e.g., wt switch feature when only origin/feature exists) creates a local branch tracking the remote — this is the standard git behavior and is preserved.
seems too detailed and prominent in our wt switch docs
so
- do we need it? how different to git's behavior are we? possibly if the same then we don't?
- if we do, let's move down
additionally, in another PR:
I think this missed some hooks?
When creating a worktree, worktrunk:
Creates worktree at configured path
Switches to new directory
Runs post-create hooks (blocking)
Spawns post-start hooks (background)
additionally in another PR:
can we combine the GitHub and GitLab sections more? the repetition makes the docs seem sparse
@worktrunk-bot this issue was dropped due to a concurrency race (fixed in #1519). Please pick it up.
Addressed all three points in #1521:
-
Trimmed upstream tracking paragraph —
--createnot setting upstream tracking is standardgit switch -cbehavior, so the prominent explanation was unnecessary. Condensed to a single sentence folded into the existing paragraph. -
Added missing hooks to creation lifecycle — The numbered list now includes
pre-switch(step 1) andpost-switch(step 6), matching the actual execution order inhandle_switch.rs. -
Combined GitHub/GitLab sections — Merged the two near-identical sections into a single "Pull requests and merge requests" section.
CI is green across all platforms.