Skip to content

Add more clarity what git restore and git checkout -- <file> does #1602

@BPylypenko

Description

@BPylypenko

Which version of the book is affected?
both

Describe the bug:
The book said that git restore <file> or git checkout -- <file>:

Git just replaced that file with the most recently-committed version

but, as I see, it actually reverts to the most recently-staged version

Steps to reproduce:

  1. Go to chapter 2.4
  2. And pay attention to the IMPORTANT notes.

Expected behavior:
where it said the most recently-committed version should say the most recently-staged version or the last staged or committed version

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