Skip to content

feat: add multi-remote workflow support#71

Merged
avihut merged 1 commit intodevelopfrom
daft-57/multi-upstream
Jan 23, 2026
Merged

feat: add multi-remote workflow support#71
avihut merged 1 commit intodevelopfrom
daft-57/multi-upstream

Conversation

@avihut
Copy link
Owner

@avihut avihut commented Jan 23, 2026

Summary

  • Add support for organizing worktrees by remote when working with multiple remotes (e.g., fork workflows with origin and upstream)
  • New git daft multi-remote command with enable/disable/status/set-default subcommands
  • New git daft branch move command to move worktrees between remote folders
  • Add --remote flag to checkout, clone, and init commands
  • Automatic migration of existing worktrees when enabling/disabling multi-remote mode

When multi-remote mode is enabled, worktrees are organized as:

project/
├── .git/
├── origin/
│   ├── main/
│   └── feature/foo/
└── upstream/
    └── main/

Test plan

  • Run just test-unit - all 96 tests pass
  • Run cargo clippy -- -D warnings - no warnings
  • Run cargo fmt -- --check - formatting correct
  • Manual testing:
    • git daft multi-remote enable migrates existing worktrees
    • git daft multi-remote disable flattens structure back
    • git worktree-checkout --remote upstream main creates worktree in upstream folder
    • git daft branch move feature/foo --to upstream moves worktree

Fixes #57

🤖 Generated with Claude Code

Add support for organizing worktrees by remote when working with multiple
remotes (e.g., fork workflows with origin and upstream).

When multi-remote mode is enabled, worktrees are organized as:
  project/origin/main/
  project/upstream/main/
  project/origin/feature/foo/

New commands:
- `git daft multi-remote enable` - Enable and migrate existing worktrees
- `git daft multi-remote disable` - Disable and flatten structure
- `git daft multi-remote status` - Show current configuration
- `git daft multi-remote set-default` - Change default remote
- `git daft branch move` - Move worktree between remote folders

New configuration keys:
- `daft.multiRemote.enabled` - Enable remote-prefixed paths
- `daft.multiRemote.defaultRemote` - Default remote for new branches

Modified commands to support --remote flag:
- git-worktree-checkout
- git-worktree-checkout-branch
- git-worktree-checkout-branch-from-default
- git-worktree-clone
- git-worktree-init

Fixes #57

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@avihut avihut linked an issue Jan 23, 2026 that may be closed by this pull request
@avihut avihut added this to the v1.0.0 milestone Jan 23, 2026
@avihut avihut self-assigned this Jan 23, 2026
@avihut avihut added the enhancement New feature or request label Jan 23, 2026
@avihut avihut merged commit 8c4d49b into develop Jan 23, 2026
4 checks passed
@avihut avihut deleted the daft-57/multi-upstream branch January 23, 2026 22:32
avihut added a commit that referenced this pull request Jan 24, 2026
Add support for organizing worktrees by remote when working with multiple
remotes (e.g., fork workflows with origin and upstream).

When multi-remote mode is enabled, worktrees are organized as:
  project/origin/main/
  project/upstream/main/
  project/origin/feature/foo/

New commands:
- `git daft multi-remote enable` - Enable and migrate existing worktrees
- `git daft multi-remote disable` - Disable and flatten structure
- `git daft multi-remote status` - Show current configuration
- `git daft multi-remote set-default` - Change default remote
- `git daft branch move` - Move worktree between remote folders

New configuration keys:
- `daft.multiRemote.enabled` - Enable remote-prefixed paths
- `daft.multiRemote.defaultRemote` - Default remote for new branches

Modified commands to support --remote flag:
- git-worktree-checkout
- git-worktree-checkout-branch
- git-worktree-checkout-branch-from-default
- git-worktree-clone
- git-worktree-init

Fixes #57

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multi-Upstream Support

1 participant