Conversation
Adds a new `sync` command that orchestrates `prune` + `update --all` in a single step. This is the recommended way to synchronize all worktrees with the remote: it first prunes stale branches/worktrees, then updates all remaining worktrees from their tracking branches. Available as `git sync`, `daft sync`, and `gwtsync` shortcut. Supports `--verbose` and `--force` flags. Handles CD out of pruned worktrees via DAFT_CD_FILE. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…status Prune phase now shows per-branch detail lines describing what was removed (worktree, local branch, remote tracking branch) instead of just aggregate counts. Update phase now distinguishes [updated] from [up to date], shows captured pull diff output indented under updated branches, and reports accurate summary counts. These improvements apply to daft sync, daft prune, and daft update commands. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ncing After prune + update, optionally rebase all worktree branches onto a base branch (e.g., master). Best-effort: conflicts are immediately aborted and reported, leaving the worktree clean. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Pass --color=always to git pull when colors are enabled so diff stats (insertions/deletions) render with proper ANSI colors in both daft update and daft sync. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
git pull doesn't support --color=always as a flag. Pass it as a git-level config override (-c color.diff=always) before the pull subcommand instead. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The sync_force and sync_cd_target tests used git-worktree-checkout on branches that didn't exist on the remote, causing checkout to fail. Push the branches to the remote before cloning so checkout can find them. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
daft sync/git worktree-synccommand that prunes stale worktrees, pulls updates for all tracked branches, and optionally rebases them onto a base branch (--rebase <BRANCH>)pruneandupdatecore logic with structured output showing per-branch status (up-to-date, updated, failed, skipped)gwtsync)Test plan
mise run test:unit— 384 tests)tests/integration/test_sync.sh)daft syncanddaft sync --rebase master🤖 Generated with Claude Code