Skip to content

git checkout -- <file_name> is incorrect #177

Open
@ediso74

Description

@ediso74

Currently:
Undo local changes with the last content in head
git checkout -- <file_name>
Should be:
Undo local changes with the content in index(staging)
git checkout -- <file_name>

Reference: https://git-scm.com/docs/git-checkout
Examples: git checkout hello.c
restore hello.c from the index

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