Skip to content

Commit

Permalink
switch from checkout to switch haha
Browse files Browse the repository at this point in the history
  • Loading branch information
hjwp committed Oct 30, 2024
1 parent 5552683 commit eb879db
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 11 deletions.
8 changes: 4 additions & 4 deletions appendix_purist_unit_tests.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ more isolated tests:

[subs="specialcharacters,quotes"]
----
$ *git checkout -b more-isolation* # a branch for this experiment
$ *git switch -c more-isolation* # a branch for this experiment
$ *git reset --hard revisit_this_point_with_isolated_tests*
----

Expand Down Expand Up @@ -2020,9 +2020,9 @@ We're happy with our new version, so let's bring it across to master:
----
$ *git add .*
$ *git commit -m "add list owners via forms. more isolated tests"*
$ *git checkout master*
$ *git checkout -b master-noforms-noisolation-bak* # optional backup
$ *git checkout master*
$ *git switch master*
$ *git switch -c master-noforms-noisolation-bak* # optional backup
$ *git switch -*
$ *git reset --hard more-isolation* # reset master to our branch.
----

Expand Down
9 changes: 6 additions & 3 deletions chapter_19_spiking_custom_auth.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ your spike commits getting mixed up with your production code:

[subs="specialcharacters,quotes"]
----
$ *git checkout -b passwordless-spike*
$ *git switch -c passwordless-spike*
----

Let's keep track of some of the things we're hoping to learn from the
Expand Down Expand Up @@ -862,10 +862,13 @@ and reintroduce them one by one in a test-driven way.


==== Reverting Our Spiked Code
//SARA: This section needs some sort of very brief intro before jumping into the code




[subs="specialcharacters,quotes"]
----
$ *git checkout main* # switch back to main branch
$ *git switch main* # switch back to main branch
$ *rm -rf src/accounts* # remove any trace of spiked code
$ *git add src/functional_tests/test_login.py*
$ *git commit -m "FT for login via email"*
Expand Down
4 changes: 2 additions & 2 deletions rename-chapter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ fi
git mv "source/$OLD_CHAPTER" "source/$NEW_NAME"

cd "source/$NEW_NAME/superlists"
git checkout "$OLD_CHAPTER"
git checkout -b "$NEW_NAME"
git switch "$OLD_CHAPTER"
git switch -c "$NEW_NAME"
git push -u local
git push -u origin
cd ../../..
Expand Down
2 changes: 1 addition & 1 deletion source/blackify-chap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ git fetch $REPO
STARTCOMMIT="$(git rev-parse $PREV)"
ENDCOMMIT="$(git rev-parse $CHAP)"

git checkout $CHAP
git switch $CHAP
git reset --hard $REPO/$PREV
ruff format .
git commit -am"initial black commit" --allow-empty
Expand Down
2 changes: 1 addition & 1 deletion source/feed-thru-cherry-picks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ fi
git fetch "$REPO"

# reset our chapter to the new version of the end of $PREV
git checkout "$CHAP"
git switch "$CHAP"
git reset --hard "$REPO/$PREV"

# now cherry pick all the old commits from $CHAP onto this new base.
Expand Down

0 comments on commit eb879db

Please sign in to comment.