0

Offer complete workflow for worktrees

RKHessel yesterday at 10:43 a.m. updated by Marc Strapetz yesterday at 1:30 p.m. 1

I am using AI agents more than in the past to do several things in parallel. For that, the worktree feature is quite useful, and SmartGit already has the menu items in the File menu to create/remove/prune worktrees.

But for me this does not assemble to a nice and easy workflow. Here is what I would like to be able to do from the UI:

  1. Add a new worktree from a remote branch, ideally from the context menu of that remote branch.
    1. Currently I have to check the branch first out to a local branch, changing the branch in an existing worktree, to be able to do "Add worktree...", only to change the branch in my existing worktree back to the original branch.
    2. Our repository is using submodules - it would be great if "Add worktree..." could be configured to automatically initialize the submodules.
    3. Ideally I would be able to configure "Add worktree" to not not open automatically a new window like it does now, instead just move over to the other worktree.
  2. Remove an existing worktree by right-clicking on it from the context menu on the worktree repo (again without having to have to load the repo in advance).  
    1. Currently, I manually delete the tree and then use "Prune..." which is clumsy because I have to first find the folder in the file explorer.
    2. "Remove worktree..." does not work for me because it does not handle submodules - it would be great if the UI function could remove (clean) submodules, and then remove the worktree.
    3. For "Remove..." I also don't need to load the repo - so "Remove worktree..." could be always available, but fail if the repo is not a worktree?
    Standard window GUI Repository Management Submodules Branches view
    +1

    SmartGit 26.1 Preview comes with a couple of worktree-related improvements already, which we have found useful in combination with AI agents: https://www.smartgit.dev/download/preview/