Re: Feature request: support listing worktrees sorted by creation time
From: Junio C Hamano <hidden>
Date: 2026-03-05 15:50:56
Norbert Kiesel [off-list ref] writes:
I have multiple repos with more than 20 worktrees, and sometimes forget the name of a recently added worktree. Therefore it would really be nice if I could use something like ‘git worktree list —created’ to list them by their creation timestamp. Is that something that makes sense to you as well? I could also create a pull request for this if you would like it.
I do not think we have any _record_ of when each of these worktrees was created, so this is not a realistic request. The output from "git worktree list" may be more than 20 lines, but isn't your terminal taller than 20 lines ;-)? Since very early days of Git, we have created .git/description file that is not used very much (I think it is shown in gitweb). Perhaps worktree should have an equivalent in per-worktree part of their .git/ directory and "git worktree list --verbose" can use its contents in addition to the additional pieces information it already shows, or something like that, perhaps?