git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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?

Previous: Norbert KieselNext: Norbert Kiesel
Message 4 of 6 in “Feature request: support listing worktrees sorted by creation time”
  1. Norbert KieselMar 5, 2026
  2. Johannes SixtMar 5, 2026
  3. Norbert KieselMar 5, 2026
  4. Junio C HamanoMar 5, 2026
  5. Norbert KieselMar 5, 2026
  6. Erik Cervin EdinMar 6, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.