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

Activity

akanksharai001

akanksharai001 commented on Jun 30, 2021

@akanksharai001

is this issue is open? ..I want to contribute on this

ediso74

ediso74 commented on Jun 30, 2021

@ediso74
Author
arnabnandy7

arnabnandy7 commented on Apr 6, 2023

@arnabnandy7
Contributor

Added a PR for this
#215
@ediso74 kindly validate

added a commit that references this issue on May 2, 2023

Merge pull request #215 from arnabnandy7/add-tips-python-env

1c23d34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

        Participants

        @arnabnandy7@ediso74@akanksharai001

        Issue actions

          git checkout -- <file_name> is incorrect · Issue #177 · git-tips/tips