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

Why are experimental commands git restore and git switch suggested in CLI output?

From
EHErik Huizinga <huizinga.erik@gmail.com>
Date
May 2, 2020, 07:18 UTC
Message-ID
<CADA507xceVtpNkK5hyUrnXM0rPBj=sgpR0eM7b+yybiWT6Cg3w@mail.gmail.com>
Hello!

Lately I've noticed that when I checkout a branch or show the working tree status, then the CLI output suggests that I can perform certain actions with new commands (since v2.23 if I'm not mistaken) restore and switch. This is very nice, because I like to see these UI enhancements. However, reading the help pages for these commands shows 'THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE.' This is somewhat discouraging use, because I don't want to learn to use these commands if their behavior may change. This could mean that what I learn about these command may not be usable on future git versions.

My questions about this are:
1. What is the git maintainers' policy regarding experimental features
like restore and switch? Apparently, they are there to be discovered
in plain sight, while experimental. Using experimental features may
not be what the user wants.
2. What exactly may change about these commands' behavior? Are the
superficially suggested actions stable? Are they stable within a patch
or minor git version only? Are existing use cases stable, or can they
be removed or incompatibly change under this experimental policy?

In other words: how can I, an individual end user, know what I can safely learn about these commands, and what can not?

Thank you in advance for your time and answers. :) Erik Huizinga

Next: Junio C Hamano
Message 1 of 2 in “Why are experimental commands git restore and git switch suggested in CLI output?”
  1. Erik HuizingaMay 2, 2020
  2. Junio C HamanoMay 2, 2020

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.