git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Benji Fisher <benji@FisherFam.org>
To: git@vger.kernel.org, nasamuffin@google.com
Cc: Benji Fisher <benji@FisherFam.org>
Subject: [PATCH] MyFirstContribution: use switch for changing branches
Date: Sun,  7 Apr 2024 17:21:09 -0400	[thread overview]
Message-ID: <20240407212109.35131-1-benji@FisherFam.org> (raw)

Use "git switch" instead of "git checkout" for changing branches.

Signed-off-by: Benji Fisher <benji@FisherFam.org>
---
 Documentation/MyFirstContribution.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Documentation/MyFirstContribution.txt b/Documentation/MyFirstContribution.txt
index f06563e981..66f38a7055 100644
--- a/Documentation/MyFirstContribution.txt
+++ b/Documentation/MyFirstContribution.txt
@@ -122,7 +122,7 @@ branch of the upstream project. Create the `psuh` branch you will use for
 development like so:
 
 ----
-$ git checkout -b psuh origin/master
+$ git switch -c psuh origin/master
 ----
 
 We'll make a number of commits here in order to demonstrate how to send a topic
@@ -878,7 +878,7 @@ on `master`, so go ahead and update as shown below, or using your preferred
 workflow.
 
 ----
-$ git checkout master
+$ git switch master
 $ git pull -r
 $ git rebase master psuh
 ----
@@ -1139,7 +1139,7 @@ We'll reuse our `psuh` topic branch for v2. Before we make any changes, we'll
 mark the tip of our v1 branch for easy reference:
 
 ----
-$ git checkout psuh
+$ git switch psuh
 $ git branch psuh-v1
 ----
 
-- 
2.40.1



             reply	other threads:[~2024-04-07 21:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-07 21:21 Benji Fisher [this message]
2024-04-08 17:42 ` [PATCH] MyFirstContribution: use switch for changing branches Junio C Hamano
2024-04-09 12:26   ` Benji Fisher
2024-04-09 13:47     ` Kipras Melnikovas
2024-04-09 16:11     ` [PATCH] MyFirstContribution: use switch for changing branches Junio C Hamano
2024-04-09 16:36       ` Emily Shaffer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240407212109.35131-1-benji@FisherFam.org \
    --to=benji@fisherfam.org \
    --cc=git@vger.kernel.org \
    --cc=nasamuffin@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).