Re: Feature request: support listing worktrees sorted by creation time
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 5, 2026, 15:50 UTC
- Message-ID
- <xmqqqzpy46n5.fsf@gitster.g>
- In-Reply-To
- <CAM+g_Nt8vZX4NxPvddJxNvSRgdMWQaLg2O9xzAU1pTHa=Et-gw@mail.gmail.com>
Norbert Kiesel <nkiesel@gmail.com> writes:
Show 6 quoted lines
> 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?