Skip to content

feat: add git wt checkout for existing branch worktrees#9

Merged
kuderr merged 1 commit into
mainfrom
feat/checkout
Feb 25, 2026
Merged

feat: add git wt checkout for existing branch worktrees#9
kuderr merged 1 commit into
mainfrom
feat/checkout

Conversation

@kuderr
Copy link
Copy Markdown
Owner

@kuderr kuderr commented Feb 25, 2026

Summary

  • New git wt checkout <branch> [name] command (alias co) to check out existing local or remote branches into managed worktrees
  • Smart branch resolution: local branches, explicit remote refs (origin/fix/bug), and auto-detection from remotes
  • Worktree names derived from branch names (feature/loginfeature-login, remote prefix stripped)
  • wtco shell alias (checkout + cd), completions for bash & zsh
  • --copy-env and --copy-ai flags supported

Test plan

  • make lint — shellcheck passes
  • git wt checkout <local-branch> — creates worktree with existing local branch
  • git wt checkout origin/<branch> — creates tracking branch and worktree (falls back to local if tracking branch already exists)
  • git wt checkout <branch-on-remote> — auto-detects from remote
  • git wt checkout <branch> <custom-name> — custom worktree name
  • git wt checkout nonexistent — clear error message
  • git wt rm works on checkout-created worktrees
  • git wt help shows checkout command and options

🤖 Generated with Claude Code

New command to check out existing local or remote branches into managed
worktrees, with auto-detection of remote tracking branches and smart
name derivation from branch names.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@kuderr kuderr merged commit b0805cd into main Feb 25, 2026
2 checks passed
@kuderr kuderr deleted the feat/checkout branch February 25, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant