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

Re: git switch/restore, still experimental?

From
Sergey Organov <sorganov@gmail.com>
Date
May 5, 2021, 19:26 UTC
Message-ID
<87y2ct56dh.fsf@osv.gnss.ru>
In-Reply-To
<6092da0ccf4e9_1d24520833@natae.notmuch>
Felipe Contreras <felipe.contreras@gmail.com> writes:
Show 24 quoted lines
> Ævar Arnfjörð Bjarmason wrote:
>> In summary, I think it should be changed to act like this:
>>     
>>     |---------------------------+------------------------+---------------------------|
>>     | What | Now | New |
>>     |---------------------------+------------------------+---------------------------|
>>     | Switch | git switch existing | git switch existing |
>>     | Error | git switch nonexisting | <no change (errors)> |
>>     | Switch with --merge | git switch -m branch | git switch
>>     | --merge branch |
>>     | Create | git switch -c new | git switch -n new |
>>     | Create from existing | N/A | git switch -c new [<old>] |
>>     | Move & switch to existing | N/A | git switch -m new [<old>] |
>>     |---------------------------+------------------------+---------------------------|
>
> I'm in favor of this too.
>
>> In its current state I find "git switch" to be unusable. That sounds
>> like dramatic hyperbole, but I'm serious.
>
> I concur.
>
> I've tried to use it multiple times, and I always come back to using git
> branch / git checkout.

I didn't look at these commands till recently, and what I immediately noticed is very unclear manual pages. I didn't read entire pages, but DESCRIPTIONS sections and some options I did check. I think that even if these commands are to be considered stable by now, the manual pages themselves need to be heavily revised before removing the EXPERIMENTAL label.

It'll be worse if unclear manual is just a symptom of unclear design though.

Thanks, -- Sergey Organov

Previous: Felipe ContrerasNext: Sergey Organov
Message 7 of 25 in “git switch/restore, still experimental?”
  1. Gábor FarkasMay 4, 2021
  2. Felipe ContrerasMay 4, 2021
  3. Elijah NewrenMay 5, 2021
  4. Eric SunshineMay 5, 2021
  5. Ævar Arnfjörð BjarmasonMay 5, 2021
  6. Felipe ContrerasMay 5, 2021
  7. Sergey OrganovMay 5, 2021
  8. Sergey OrganovMay 5, 2021
  9. Junio C HamanoMay 6, 2021
  10. Sergey OrganovMay 6, 2021
  11. Ævar Arnfjörð BjarmasonMay 6, 2021
  12. Sergey OrganovMay 6, 2021
  13. Junio C HamanoMay 6, 2021
  14. Ævar Arnfjörð BjarmasonMay 6, 2021
  15. Ævar Arnfjörð BjarmasonMay 10, 2021
  16. Junio C HamanoMay 10, 2021
  17. Felipe ContrerasMay 6, 2021
  18. Ævar Arnfjörð BjarmasonMay 6, 2021
  19. Felipe ContrerasMay 6, 2021
  20. Ævar Arnfjörð BjarmasonMay 10, 2021
  21. Felipe ContrerasMay 11, 2021
  22. Johannes SchindelinMay 5, 2021
  23. Randall S. BeckerMay 5, 2021
  24. Junio C HamanoMay 6, 2021
  25. Felipe ContrerasMay 5, 2021

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.