Closed yrtimiD closed 1 year ago
Hi @yrtimiD,
Good catch!
Thanks for the solution. I tested it and it seems to work.
The fix has been published!
I also changed the default value of vsCodeGitWorktrees.move.openNewVscodeWindow. I feel it is good not to lose your previous vscode instance(as default behavior). You will also be able to see the informational message about the creation of the new worktree.
Great, thanks! BTW, as a suggestion, on open a new vscode with a new worktree - can you pass current opened workspace to it?
Oh, I see.
So, you have created a workspace with your worktrees and when you create a new worktree you want to add it to the workspace instead of opening a new vscode instance. Am I right? If I am, I'm assuming that the vscode won't open/reload, but just add the project to the workspace.
How does that sound to you? I think it would be a great addition to the current implementation.
let's move the "open vscode" offtopic to #15
tested v1.0.19, works good now, thank you!
Worktrees for the multi-part branches, like 'projX/bugfix/123' can't be added.
looks like if you do not specify a branch in the
git worktree add <folder> <branch>
command - git assumes the last part of the folder as a branch name, and new worktree become connected to a wrong branch. Thegit branch --set-upstream-to...
command should fix this, but something goes wrong. Anyway, looks like there is an easier solution: if you'll merge these commands:to a single one:
Resulting worktree folder will be created with the proper branch and upstream.