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

[PATCH 2/2] builtin: unmark git-switch and git-restore as experimental

From
Justin Tobler <jltobler@gmail.com>
Date
Jul 22, 2025, 18:08 UTC
Message-ID
<20250722180818.1043014-3-jltobler@gmail.com>
In-Reply-To
<20250722180818.1043014-1-jltobler@gmail.com>

In 4e43b7ff (Declare both git-switch and git-restore experimental, 2019-04-25), the newly introduced git-switch(1) and git-restore(1) commands were marked as experimental. This was done to provide time to make breaking changes to the interface. It has now been over six years since these commands were implemented and there has not been much change that would warrant these commands remaining experimental.

A previous series[1] from about a year ago, also proposed removing the experimental marker for these commands. One point of hesitation pertained to an unaddressed suggestion[2] to change the `-c` and `-m` short flags in git-switch(1) to allow them to be used for different operations that may be a better fit. In the preceding patch, the `-m` short flag is dropped following this suggestion. For the `-c` short flag though, the operation to create a new branch is common enough to warrant a short flag. Given how common this option is, changing it would be disruptive to users and, absent a substantially better choice, is difficult to justify changing.

Outside of these suggested option changes, there does not appear to be any other discussion that would warrant breaking changes to these commands. This likely signals that the foundations of these commands are in a decent state. Furthermore, by removing the experimental marker, the stability and maturity of these commands is clarified making it easier for users to adopt and recommend.

Update the documentation for git-switch(1) and git-restore(1) to remove the experimental label.

[1]: https://lore.kernel.org/git/20240220092957.1296283-2-matttbe@kernel.org/ [2]: https://lore.kernel.org/git/877dkdwgfe.fsf@evledraar.gmail.com/

Signed-off-by: Justin Tobler <jltobler@gmail.com>
---
 Documentation/git-restore.adoc | 2 --
 Documentation/git-switch.adoc  | 2 --
 2 files changed, 4 deletions(-)
diff --git a/Documentation/git-restore.adoc b/Documentation/git-restore.adoc
index 96de9bb5ed7..903e8c4618a 100644
--- a/Documentation/git-restore.adoc
+++ b/Documentation/git-restore.adoc
@@ -28,8 +28,6 @@ otherwise from the index. Use `--source` to restore from a different commit.
 See "Reset, restore and revert" in linkgit:git[1] for the differences
 between the three commands.
 
-THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE.
-
 OPTIONS
 -------
 `-s <tree>`::
diff --git a/Documentation/git-switch.adoc b/Documentation/git-switch.adoc
index 7b24450f841..1d46010292d 100644
--- a/Documentation/git-switch.adoc
+++ b/Documentation/git-switch.adoc
@@ -29,8 +29,6 @@ Switching branches does not require a clean index and working tree
 however if the operation leads to loss of local changes, unless told
 otherwise with `--discard-changes` or `--merge`.
 
-THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE.
-
 OPTIONS
 -------
 _<branch>_::
-- 
2.50.1.214.ga30f80fde9
Previous: Justin ToblerNext: Junio C Hamano
Message 5 of 11 in “builtin: unmark git-switch and git-restore as experimental”
  1. 0/2 builtin: unmark git-switch and git-restore as experimentalJustin Tobler, Jul 22, 2025
  2. 1/2 builtin: remove merge short flag for switch and restoreJustin Tobler, Jul 22, 2025
  3. Junio C HamanoJul 22, 2025
  4. Justin ToblerJul 22, 2025
  5. 2/2 builtin: unmark git-switch and git-restore as experimentalJustin Tobler, Jul 22, 2025
  6. Junio C HamanoJul 22, 2025
  7. Justin ToblerJul 22, 2025
  8. Junio C HamanoJul 22, 2025
  9. Justin ToblerJul 22, 2025
  10. builtin: unmark git-switch and git-restore as experimentalJustin Tobler, Jul 28, 2025
  11. Junio C HamanoJul 28, 2025

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.