Closed tomoum closed 1 year ago
Hi @tomoum, I am glad you like the extension.
Sorry for the delay, but I've been on the run for the past few days.
Concerning the level of the worktrees, your idea about replacing /
with -
is good. I will look into it as another feature where users would be able to create a worktree based on their preferences. It will be configurable based on the vscode properties.
From my understanding, one solution would be the Git Worktree: Checkout
you suggested. The other one would be to change the flow of the Git Worktree: Add
operation to show you first the remote branches, select a remote branch, then type the new worktree name or press ESC to cancel the operation.
Would that be something you like? Or have I misunderstood something?
yes, that would be amazing. Either of those would be great additions! that would be much appreciated! thanks, @alexiszamanidis
I am also interested in the suggested feature! "to change the flow of the Git Worktree: Add operation to show you first the remote / existing branches"
Sometimes i think this will be just a small change, so i don't create a worktree for it, but later the change requires more rework, and i want to create a worktree with an existing feature branch. I also like the suggestion to use a remote branch for creating a new worktree!
Hi @grooc,
This is an excellent idea.
So, in the first step, we will list all the local and remote branches and have something like this: master
, origin/master
.
I will definitely adjust it in the implementation.
Hi guys(@tomoum, @grooc),
Apologies for the delay!
The enhancement has been published v1.0.21
!
I have changed the flow of the git worktree add
operation.
I would really like to know if this enhancement was what you were looking for.
Please test it when you are free and let me know about your experience.
P.S. @grooc for the local branches, please check what I responded to you about it here #21
This is perfect now. Works like a charm. This is exactly what I wanted. Thanks @alexiszamanidis !! great job!
I'm glad you liked it.
Thank you for your time and contribution.
First off thanks for this awesome tool!
Feature Request: I find that specifying the new branch name every time I want to add a new worktree is quite annoying. It would be much nicer if that flow works similar to the gitlens worktree feature in that it just shows me the remotes and I can choose one right away and then use the branch name as the folder name. You would need to process the branch name and replace
/
with-
in order to keep all clones just one folder deep. However, it would be fine to do it like git lens and create subfolders that match the branch name.E.g:
I hope this is clear. I think it would be an easier way to clone remotes that match the remote branch name by default.
Thanks EDIT: I realize now that maybe the intent of this is different. Maybe this would be a difference command called
Git Worktree: Checkout
.