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

Re: Feature request: support listing worktrees sorted by creation time

From
NKNorbert Kiesel <nkiesel@gmail.com>
Date
Mar 5, 2026, 07:41 UTC
Message-ID
<CAM+g_Nsw52JysCsv-FVznh-RAPxYm0kA=Kj2o+KVB5uZpGA0qg@mail.gmail.com>
In-Reply-To
<264862d1-0f83-4d0b-be11-d8e479c7d8da@kdbg.org>

My understanding is that the timestamp of the base worktree directories is updated whenever a new file is created in that directory, and thus this will not preserve the worktree creation time. Therefore, I would like to have an explicit creation timestamp in the worktree metadata.

On Wed, Mar 4, 2026 at 11:35 PM Johannes Sixt <j6t@kdbg.org> wrote:
Show 18 quoted lines
>
> Am 05.03.26 um 08:14 schrieb Norbert Kiesel:
> > 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 don't think this is warranted as a feature for a special-purpose
> use-case. Assuming you don't have spaces in your worktree directory names,
>
>   git worktree list | cut -d' ' -f1 | xargs ls -ldtr
>
> lists the worktree directories by modification time. The last is the one
> that was modified most recently. That should help your memory.
>
> -- Hannes
>
Previous: Johannes SixtNext: Junio C Hamano
Message 3 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.