Open
Description
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 commentedon Jun 30, 2021
is this issue is open? ..I want to contribute on this
ediso74 commentedon Jun 30, 2021
Fix:git checkout -- <file_name> is incorrect git-tips#177
arnabnandy7 commentedon Apr 6, 2023
Added a PR for this
#215
@ediso74 kindly validate
Merge pull request #215 from arnabnandy7/add-tips-python-env