Go to the content
DE Download
Pages of the documentation

Worktrees

A workflow run creates a git worktree for a task with worktree: true. The worktrees stay on the disk after the task ends. This plugin lists them, so you can see which worktree is old and how much space it uses.

What the view shows

One row for each worktree of each project repository:

Value Source
Branch git worktree list of the repository
Task The task of the project whose branch value is the branch of the worktree
Size The size of the folder on the disk, after you select Measure the sizes
Age The date of the last commit of the worktree
Changes The count of the changed and the new files (git status)

The main checkout of a repository is not in the list.

How to remove a worktree

  1. Select the trash button of a row.
  2. Confirm the dialog.

The plugin runs git worktree remove without the force option. Git refuses a worktree with a changed file or a new file, so the plugin cannot remove work that is not committed. The branch stays in the repository.

Limits

  • The plugin reads only the repositories of the projects of this vault (the local value of the project note).
  • The list does not measure the sizes, because a large folder takes seconds. The button Measure the sizes measures one worktree after the other.
  • The plugin does not delete a branch and does not prune a worktree whose folder is gone.