Skip to content

Add custom worktree destination support - #106

Merged
shmuelie merged 3 commits into
mainfrom
shmuelie/issue-68-worktree-custom-path
Aug 21, 2026
Merged

Add custom worktree destination support#106
shmuelie merged 3 commits into
mainfrom
shmuelie/issue-68-worktree-custom-path

Conversation

@shmuelie

Copy link
Copy Markdown
Owner

Summary

  • Adds -WorktreePath to New-Worktree and Add-Worktree for explicit destination worktree locations.
  • Preserves the existing generated sibling-path behavior when -WorktreePath is omitted.
  • Keeps -SetLocation aligned with the resolved destination and surfaces git worktree add errors with git's output.

Validation

  • ./build/Test-Modules.ps1
  • ./build/Invoke-Tests.ps1 -Path tests/Shmuelie.Git.Tests.ps1
  • ./build/Invoke-Tests.ps1

Closes #68

Allow New-Worktree and Add-Worktree to accept an explicit destination via -WorktreePath while preserving the existing generated sibling path when omitted.

Capture git worktree add failures and surface the underlying git message so invalid destinations remain actionable.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: b98f01a0-a039-492f-8576-b1917e54742d
…ktree-custom-path

# Conflicts:
#	modules/Shmuelie.Git/CHANGELOG.md
@shmuelie
shmuelie merged commit 98cfc95 into main Aug 21, 2026
1 check passed
@shmuelie
shmuelie deleted the shmuelie/issue-68-worktree-custom-path branch August 21, 2026 21:33
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.

Allow worktree cmdlets to create a worktree at a caller-supplied path

1 participant