Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git checkout -- <file_name> is incorrect #177

Open
ediso74 opened this issue Aug 7, 2019 · 3 comments
Open

git checkout -- <file_name> is incorrect #177

ediso74 opened this issue Aug 7, 2019 · 3 comments

Comments

@ediso74
Copy link

ediso74 commented Aug 7, 2019

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

@akanksharai001
Copy link

akanksharai001 commented Jun 30, 2021

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

@ediso74
Copy link
Author

ediso74 commented Jun 30, 2021 via email

arnabnandy7 added a commit to arnabnandy7/tips that referenced this issue Apr 6, 2023
@arnabnandy7
Copy link
Contributor

Added a PR for this
#215
@ediso74 kindly validate

hemanth added a commit that referenced this issue May 2, 2023
Fix:git checkout -- <file_name> is incorrect #177
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants