10000 Inconsistency: Git restore is only used once, rest of book uses reset HEAD · Issue #1487 · progit/progit2 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Inconsistency: Git restore is only used once, rest of book uses reset HEAD #1487
Closed
@HonkingGoose

Description

@HonkingGoose

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:

  1. Search for hits on the string git reset HEAD in the book, notice it's used everywhere for git status and unstaging examples the book uses.
  2. 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:

  1. Revert the merge that resulted in the inconsistency: To untrack a tracked file there is a different command now #1338
  2. 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 of git reset HEAD.
  3. 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: "If git restore doesn't work for you, try git 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0