Description
Which version of the book is affected?
Problem is with the source files, present on current master
.
Describe the bug:
Inconsistency in the way to unstage a staged file.
Our examples use use git reset HEAD <file to unstage>
.
The status output we show is using git reset HEAD
, as that is Git's prior advice before the git restore
command became a thing.
There's one place where the book uses git restore
and it's introduced with commit: dc15a30
Steps to reproduce:
- Search for hits on the string
git reset HEAD
in the book, notice it's used everywhere forgit status
and unstaging examples the book uses. - Search for hits on the string
git restore
, notice it's only used once.
Expected behavior:
I expect the book to present a single way to unstage, and be consistent with it, so that readers are never confused.
Options to fix this:
- Revert the merge that resulted in the inconsistency: To untrack a tracked file there is a different command now #1338
- Revert the merge that resulted in the inconsistency: To untrack a tracked file there is a different command now #1338 plus create a TIP block in an appropriate place in the book with the hint that
git restore
can be used instead ofgit reset HEAD
. - Change over the entire book to use the newer
git restore
command, and put a note up in a appropriate place with something to the effect of: "Ifgit restore
doesn't work for you, trygit reset HEAD
.
I'll wait for the maintainers feedback before making a pull request to fix it in one of the three ways listed.
Context:
This kind of issue also crops up with: #1441