Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
Add Local CI section to wt merge help (#272)
Maximilian Roos8173bf8671a6
diff --git a/docs/content/merge.md b/docs/content/merge.mdindex dc68a1a8e..9ca4ebe84 100644--- a/docs/content/merge.md+++ b/docs/content/merge.md@@ -61,6 +61,20 @@ wt merge --no-commitUse `--no-commit` to skip all git operations (steps 1-2) and only run hooks and merge. Useful after preparing commits manually with `wt step`. Requires a clean working tree.+## Local CI++For personal projects, pre-merge hooks open up the possibility of a workflow with much faster iteration — an order of magnitude more small changes instead of fewer large ones.++Historically, ensuring tests ran before merging was difficult to enforce locally. Remote CI was valuable for the process as much as the checks: it guaranteed validation happened. `wt merge` brings that guarantee local.++The full workflow: start an agent (one of many) on a task, work elsewhere, return when it's ready. Review the diff, run `wt merge`, move on. Pre-merge hooks validate before merging — if they pass, the branch goes to main and the worktree cleans up.++```toml+[pre-merge]+test = "cargo test"+lint = "cargo clippy"+```+## See also- [wt step](@/step.md) — Run individual merge steps (commit, squash, rebase, push)diff --git a/src/cli.rs b/src/cli.rsindex f672ebd40..154fa283f 100644--- a/src/cli.rs+++ b/src/cli.rs@@ -2343,6 +2343,20 @@ wt merge --no-commitUse `--no-commit` to skip all git operations (steps 1-2) and only run hooks and merge. Useful after preparing commits manually with `wt step`. Requires a clean working tree.+## Local CI++For personal projects, pre-merge hooks open up the possibility of a workflow with much faster iteration — an order of magnitude more small changes instead of fewer large ones.++Historically, ensuring tests ran before merging was difficult to enforce locally. Remote CI was valuable for the process as much as the checks: it guaranteed validation happened. `wt merge` brings that guarantee local.++The full workflow: start an agent (one of many) on a task, work elsewhere, return when it's ready. Review the diff, run `wt merge`, move on. Pre-merge hooks validate before merging — if they pass, the branch goes to main and the worktree cleans up.++```toml+[pre-merge]+test = "cargo test"+lint = "cargo clippy"+```+## See also- [wt step](@/step.md) — Run individual merge steps (commit, squash, rebase, push)diff --git a/tests/snapshots/integration__integration_tests__help__help_md_merge.snap b/tests/snapshots/integration__integration_tests__help__help_md_merge.snapindex 3c79b7d10..a31827a2d 100644--- a/tests/snapshots/integration__integration_tests__help__help_md_merge.snap+++ b/tests/snapshots/integration__integration_tests__help__help_md_merge.snap@@ -120,6 +120,23 @@ the worktree is preserved.Use `--no-commit` to skip all git operations (steps 1-2) and only run hooks and merge. Useful after preparing commits manually with `wt step`.Requires a clean working tree.+## Local CI++For personal projects, pre-merge hooks open up the possibility of a workflow with much faster iteration — an order of magnitude more small changes+instead of fewer large ones.++Historically, ensuring tests ran before merging was difficult to enforce locally. Remote CI was valuable for the process as much as the checks: it+guaranteed validation happened. `wt merge` brings that guarantee local.++The full workflow: start an agent (one of many) on a task, work elsewhere, return when it's ready. Review the diff, run `wt merge`, move on. Pre-merge+hooks validate before merging — if they pass, the branch goes to main and the worktree cleans up.++```toml+[pre-merge]+test = "cargo test"+lint = "cargo clippy"+```+## See also- [wt step](@/step.md) — Run individual merge steps (commit, squash, rebase, push)diff --git a/tests/snapshots/integration__integration_tests__help__help_merge_long.snap b/tests/snapshots/integration__integration_tests__help__help_merge_long.snapindex f4f67ca23..1864194c9 100644--- a/tests/snapshots/integration__integration_tests__help__help_merge_long.snap+++ b/tests/snapshots/integration__integration_tests__help__help_merge_long.snap@@ -111,6 +111,21 @@ the worktree is preserved.Use [2m--no-commit[0m to skip all git operations (steps 1-2) and only run hooks and merge. Useful after preparing commits manually with [2mwt step[0m.Requires a clean working tree.+[32mLocal CI++For personal projects, pre-merge hooks open up the possibility of a workflow with much faster iteration — an order of magnitude more small changes+instead of fewer large ones.++Historically, ensuring tests ran before merging was difficult to enforce locally. Remote CI was valuable for the process as much as the checks: it+guaranteed validation happened. [2mwt merge[0m brings that guarantee local.++The full workflow: start an agent (one of many) on a task, work elsewhere, return when it's ready. Review the diff, run [2mwt merge[0m, move on. Pre-merge+hooks validate before merging — if they pass, the branch goes to main and the worktree cleans up.++ [2m[pre-merge]+ [2mtest = "cargo test"+ [2mlint = "cargo clippy"+[32mSee also- wt step — Run individual merge steps (commit, squash, rebase, push)diff --git a/tests/snapshots/integration__integration_tests__help__help_page_merge.snap b/tests/snapshots/integration__integration_tests__help__help_page_merge.snapindex 8eefae516..858dd8e49 100644--- a/tests/snapshots/integration__integration_tests__help__help_page_merge.snap+++ b/tests/snapshots/integration__integration_tests__help__help_page_merge.snap@@ -71,6 +71,20 @@ wt merge --no-commitUse `--no-commit` to skip all git operations (steps 1-2) and only run hooks and merge. Useful after preparing commits manually with `wt step`. Requires a clean working tree.+## Local CI++For personal projects, pre-merge hooks open up the possibility of a workflow with much faster iteration — an order of magnitude more small changes instead of fewer large ones.++Historically, ensuring tests ran before merging was difficult to enforce locally. Remote CI was valuable for the process as much as the checks: it guaranteed validation happened. `wt merge` brings that guarantee local.++The full workflow: start an agent (one of many) on a task, work elsewhere, return when it's ready. Review the diff, run `wt merge`, move on. Pre-merge hooks validate before merging — if they pass, the branch goes to main and the worktree cleans up.++```toml+[pre-merge]+test = "cargo test"+lint = "cargo clippy"+```+## See also- [wt step](@/step.md) — Run individual merge steps (commit, squash, rebase, push)