-
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
git worktree support appears limited at the moment, but this feature is core to my workflow (stacking or otherwise). Situation:
- I have
mainas default and trunk, not checked out feature-acheckout out in main repofeature-bchecked out in worktree
Running gh stack cascade in feature-a:
> gh stack cascade
Cascading feature-a onto main (using fork point)...
Done in 6s 453ms
Successfully rebased and updated refs/heads/feature-a.
Cascading feature-a... ok
Cascading feature-b onto feature-a (using fork point)...
Error: git checkout: fatal: 'feature-b' is already used by worktree at '~/worktrees/feature-b'
Running gh stack cascade in the feature-b worktree works, but there's a warning:
> gh stack cascade
Warning: could not save undo state: mkdir ~/worktrees/feature-b/.git: not a directory
Cascading feature-b onto feature-a (using fork point)...
Done in 6s 387ms
Being a worktree, feature-b/.git is a text file with the content:
gitdir: <path to feature-a>
It seems like the correct way to handle this would be one of:
cdinto worktree dirs in a subshell and run commands there (ideal)- stop cascading when encountering a branch in a worktree (less ideal, essentially the status quo but without an error)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels