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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 8, 2024, 17:42 UTC
Message-ID
<xmqqr0ffbvjq.fsf@gitster.g>
In-Reply-To
<20240407212109.35131-1-benji@FisherFam.org>
Benji Fisher <benji@FisherFam.org> writes:
> Use "git switch" instead of "git checkout" for changing branches.
... because?

In the proposed log message, make sure you are telling the readers WHY the change was needed and desirable.

The usual way to compose a log message for this project is to
 - Give an observation on how the current system work in the present
   tense (so no need to say "Currently X is Y", just "X is Y"), and
   discuss what you perceive as a problem in it.
 - Propose a solution (optional---often, problem description
   trivially leads to an obvious solution in reader's minds).
 - Give commands to the codebase to "become like so".
in this order.

For this particular patch, I do not see a compelling reason why we should make these changes. It is not like MyFirst* documents consistently uses "git switch" (and "git restore") in other places and these three are the exceptions (in which case that would be a very good justification you would describe in the "observation" paragraph of your proposed log message). We are not deprecating "git checkout", either.

Thanks.
Previous: Benji FisherNext: Benji Fisher
Message 2 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.