+2
Completed

Add menu to completely remove a worktree

Iulian Onofrei 1 year ago updated by Endolith 1 month ago 10
GOOD, I'M SATISFIED
Satisfaction mark by Iulian Onofrei 9 months ago

IMHO, Git only supports "Prune obsolete worktrees" which already exists as a menu item.

But it (SmartGit) could also `rm -rf` the directory, right?

But it would be tricky, because there could be other obsolete worktrees, too, that silently could be deleted, too.

Then maybe a separate menu "Delete worktree" that only deleted the files on the disk, and then prune removes it from git?

Because it's weird to have to switch to another app (Finder) to do a part of the feature (Worktrees) while being able to do other parts directly in SmartGit.

So this was implemented in 19.2, right?

Completed

Yes, "git worktree remove" has been added in SmartGit 19.2.

Are there instructions on how to use this?  It's grayed out for me, and I can't check out that branch because it says it's already checked out in the worktree, even though I deleted the folder manually because I couldn't figure out how to use the menu option.

If the worktree directory has already been deleted, use Repository | Prune Obsolete Worktrees from one of the other worktrees or the main repository.

That menu item is grayed out, too.  I right-clicked the repo and clicked Open Git-Shell and typed "git worktree prune" and it worked fine, so I don't know why the menu options aren't available.

(They weren't available before I manually deleted the folder, either.)

20.1.3 #15164, installed: #15149