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

Re: [PATCH] MyFirstContribution: use switch for changing branches

From
Emily Shaffer <nasamuffin@google.com>
Date
Apr 9, 2024, 16:36 UTC
Message-ID
<CAJoAoZmBvkVzP2i=BEgZ9fEcQFHtPkh4pPHm4hj_U5AUqKQFFw@mail.gmail.com>
In-Reply-To
<xmqqwmp61poj.fsf@gitster.g>
On Tue, Apr 9, 2024 at 9:11 AM Junio C Hamano <gitster@pobox.com> wrote:
Show 33 quoted lines
>
> Benji Fisher <benji@fisherfam.org> writes:
>
> > I was under the impression that the new "git switch" and "git restore"
> > commands were recommended in most cases instead of "git checkout".
>
> These two were added so that eventually we have something we can
> recommend to new users, but as a pair of experimental commands, we
> reserve the rights to update their UI in backward incompatible ways
> (meaning: those who use them may need to retrain their fingers and
> update their scripts if they used them---not that using these
> Porcelain commands in scripts is a good idea to begin with).
>
> So your justification could be
>
>     We want to evantually be able to recommend restore/switch to new
>     users, and want to take advantage of every opportunity to polish
>     them.
>
>     Because this document is not exactly for totally new users, and
>     the readers are expected to be knowledgeable enough and highly
>     motivated in improving git, let's have them use these
>     experimental commands and report newbie-issues they found using
>     them, so that we can gain more experience and chances to polish
>     the command and eventually make them recommendable to new users.
>
> Note that the "WHY?" in my response was not "I see no reason to do
> this", but "You need to say why you think this is a good idea here
> in the proposed commit log message".  Without your version of
> reasoning, my conclusion was "I do not see a point", but with a
> justification like this (there could be others---it is contributor's
> job to explain why a proposed change is a good idea, not mine), I
> can understand the reasoning why this change may be a good one.

For what it's worth, when I wrote this doc I was new enough to hacking Git that I did not know about the new experimental commands ;) or else I would have used them. I am not opposed to pointing them out in this doc as part of general evangelism towards a nice UX improvement (and that could be good justification for the commit message, if you agree, Benji).

 - Emily
Previous: Junio C Hamano
Message 6 of 6 in “MyFirstContribution: use switch for changing branches”
  1. MyFirstContribution: use switch for changing branchesBenji Fisher, Apr 7, 2024
  2. Junio C HamanoApr 8, 2024
  3. Benji FisherApr 9, 2024
  4. Kipras Melnikovas, Apr 9, 2024
  5. Junio C HamanoApr 9, 2024
  6. Emily ShafferApr 9, 2024

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.