Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
docs: Add GitHub squash merge analogy to wt merge (#42)
Maximilian Roos3726913f6fe3
diff --git a/README.md b/README.mdindex b2f600b31..b44243c11 100644--- a/README.md+++ b/README.md@@ -150,7 +150,7 @@ $ wt merge```<!-- README:end -->-Use `wt step commit` to commit changes with LLM-generated messages without the full merge workflow.+Use `wt step commit` to commit changes with LLM commit messages without the full merge workflow.For more details, including custom prompt templates: `wt config --help`@@ -482,12 +482,12 @@ Commit → Squash → Rebase → Pre-merge hooks → Push → Cleanup → Post-m### Commit-Uncommitted changes are staged and committed with LLM message.+Uncommitted changes are staged and committed with LLM commit message.Use `--stage=tracked` to stage only tracked files, or `--stage=none` to commit only what's already staged.### Squash-Multiple commits are squashed into one with LLM message.+Multiple commits are squashed into one (like GitHub's "Squash and merge") with LLM commit message.Skip with `--no-squash`. Safety backup: `git reflog show refs/wt-backup/<branch>`### Rebase@@ -854,8 +854,8 @@ wt step — Primitive operations (building blocks for workflows)Usage: step <COMMAND>Commands:- commit Commit changes with LLM message- squash Squash commits with LLM message+ commit Commit changes with LLM commit message+ squash Squash commits with LLM commit messagepush Push changes to local target branchrebase Rebase onto targetpost-create Run post-create hookdiff --git a/src/cli.rs b/src/cli.rsindex 53f492ae7..fbf3b523a 100644--- a/src/cli.rs+++ b/src/cli.rs@@ -387,7 +387,7 @@ Stored in git config under `worktrunk.status.<branch>`."#/// Primitive operations (building blocks for workflows)#[derive(Subcommand)]pub enum StepCommand {- /// Commit changes with LLM message+ /// Commit changes with LLM commit messageCommit {/// Skip approval prompts#[arg(short, long)]@@ -402,7 +402,7 @@ pub enum StepCommand {stage: Option<crate::commands::commit::StageMode>,},- /// Squash commits with LLM message+ /// Squash commits with LLM commit messageSquash {/// Target branch///@@ -907,12 +907,12 @@ Commit → Squash → Rebase → Pre-merge hooks → Push → Cleanup → Post-m### Commit-Uncommitted changes are staged and committed with LLM message.+Uncommitted changes are staged and committed with LLM commit message.Use `--stage=tracked` to stage only tracked files, or `--stage=none` to commit only what's already staged.### Squash-Multiple commits are squashed into one with LLM message.+Multiple commits are squashed into one (like GitHub's "Squash and merge") with LLM commit message.Skip with `--no-squash`. Safety backup: `git reflog show refs/wt-backup/<branch>`### Rebasediff --git a/tests/integration_tests/merge.rs b/tests/integration_tests/merge.rsindex 626763108..f8141747f 100644--- a/tests/integration_tests/merge.rs+++ b/tests/integration_tests/merge.rs@@ -798,7 +798,7 @@ args = ["-c", "cat >/dev/null && echo 'fix: improve auth validation logic'"]"#;fs::write(repo.test_config_path(), worktrunk_config).unwrap();- // Merge with LLM configured - should auto-commit with LLM message+ // Merge with LLM configured - should auto-commit with LLM commit messagesnapshot_merge("merge_auto_commit_with_llm",&repo,diff --git a/tests/integration_tests/shell_wrapper.rs b/tests/integration_tests/shell_wrapper.rsindex 9041741f5..a11baeb11 100644--- a/tests/integration_tests/shell_wrapper.rs+++ b/tests/integration_tests/shell_wrapper.rs@@ -1974,7 +1974,7 @@ approved-commands = ["echo 'cleanup test'"]/// README example: Pre-merge hooks with squash and LLM commit message////// This test demonstrates:- /// - Multiple commits being squashed with LLM-generated message+ /// - Multiple commits being squashed with LLM commit message/// - Pre-merge hooks (test, lint) running before merge////// Source: tests/snapshots/shell_wrapper__tests__readme_example_hooks_pre_merge.snapdiff --git a/tests/snapshots/integration__integration_tests__help__help_merge.snap b/tests/snapshots/integration__integration_tests__help__help_merge.snapindex 36bc90abf..d23f4d832 100644--- a/tests/snapshots/integration__integration_tests__help__help_merge.snap+++ b/tests/snapshots/integration__integration_tests__help__help_merge.snap@@ -1,5 +1,6 @@---source: tests/integration_tests/help.rs+assertion_line: 16info:program: wtargs:@@ -66,12 +67,12 @@ Commit → Squash → Rebase → Pre-merge hooks → Push → Cleanup → Post-m### Commit-Uncommitted changes are staged and committed with LLM message.+Uncommitted changes are staged and committed with LLM commit message.Use [2m--stage=tracked[0m to stage only tracked files, or [2m--stage=none[0m to commit only what's already staged.### Squash-Multiple commits are squashed into one with LLM message.+Multiple commits are squashed into one (like GitHub's "Squash and merge") with LLM commit message.Skip with [2m--no-squash[0m. Safety backup: [2mgit reflog show refs/wt-backup/<branch>[0m### Rebase