progit2 icon indicating copy to clipboard operation
progit2 copied to clipboard

Rewrite recommend `git switch` instead of `git checkout`

Open HonkingGoose opened this issue 4 years ago • 2 comments

Which version of the book is affected?

This affects our mainline branch, when macOS and Debian stable include newer versions of Git that have the git switch command.

Describe the bug:

When stable platforms use newer versions of Git, we should not be using git checkout as the recommended way to do things, and instead promote git switch usage.

Steps to reproduce:

Just look through the book and note that we use git checkout instead of git switch.

Expected behavior:

What the rewrite should do:

  • [ ] Get rid of the [NOTE] that pull #1523 introduced.
  • [ ] Rewrite book to use git switch instead of git checkout where possible.
  • [ ] Add [NOTE] explaining that git checkout is the "old way" of doing things.

Screenshots:

Additional context:

From @ben at https://github.com/progit/progit2/issues/1515#issuecomment-691218497:

We can rewrite to recommend switch first and checkout as a note when MacOS and (apparently) Debian stable have newer versions.

From @Paebbels:

When Git 2.27+ is bundled with most common distributions (e.g. Debian stable), the usage of git checkout can be degraded to a foot note or so.

I copied/pasted @ben's words, so that we can keep track of this issue here, instead of on a issue (#1515) that will be closed when my pull is merged.

HonkingGoose avatar Sep 12 '20 10:09 HonkingGoose

AlgaedAhmed avatar Sep 22 '20 06:09 AlgaedAhmed

Looks like we're good to go for this issue now! See the discussion in this issue for more details about the current versions of Git:

  • https://github.com/progit/progit2/issues/1529

HonkingGoose avatar Feb 14 '23 11:02 HonkingGoose