lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 9cbb041 1/7: Prefer 'git switch' to optionles


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 9cbb041 1/7: Prefer 'git switch' to optionless 'git checkout'
Date: Sun, 23 Aug 2020 18:00:51 -0400 (EDT)

branch: master
commit 9cbb041dfc59e07ae1a713d7cacd7624fcf2a3bd
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Prefer 'git switch' to optionless 'git checkout'
---
 gwc/develop1.txt | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/gwc/develop1.txt b/gwc/develop1.txt
index baba8ff..cd5be00 100644
--- a/gwc/develop1.txt
+++ b/gwc/develop1.txt
@@ -87,9 +87,12 @@ git cherry-pick 8e247c13
   # ...for pure divagations
 
 git branch odd/foo
-git checkout odd/foo
+git switch odd/foo
+  or
+git switch --create odd/foo
+  (instead of separate git-branch and git-switch commands)
 git commit sandbox_test.cpp
-git checkout master
+git switch master
 git push origin odd/foo
 
   # to transplant already-pushed commits to a new branch
@@ -109,12 +112,12 @@ git push origin --delete odd/foo
   # ...for failing unit tests that are to be...
 
 git branch odd/foo
-git checkout odd/foo
+git switch odd/foo
 git commit miscellany_test.cpp -m"Add a failing unit test"
   # ...corrected later (see:
   #   https://lists.nongnu.org/archive/html/lmi/2018-03/msg00084.html
   # for a git-merge alternative)
-git checkout master
+git switch master
 git cherry-pick --no-commit ..odd/foo
 git commit miscellany.cpp miscellany_test.cpp -m"Enhance to pass new unit test"
 git push origin odd/foo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]