git-tips / tips

Most commonly used git tips and tricks.
http://git.io/git-tips
MIT License
21.29k stars 1.7k forks source link

git checkout -- <file_name> is incorrect #177

Open ediso74 opened 5 years ago

ediso74 commented 5 years ago

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

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

akanksharai001 commented 3 years ago

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

ediso74 commented 3 years ago

no clue

Regards, Ed


From: akanksharai001 @.> Sent: Wednesday, June 30, 2021 2:16 AM To: git-tips/tips @.> Cc: Edward Croft @.>; Author @.> Subject: Re: [git-tips/tips] git checkout -- is incorrect (#177)

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

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/git-tips/tips/issues/177#issuecomment-871126847, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACEBERBDMRZVLADO3NBQECTTVKZDPANCNFSM4IJ3XDJA.

[https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif]https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon Virus-free. www.avast.comhttps://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link

arnabnandy7 commented 1 year ago

Added a PR for this https://github.com/git-tips/tips/pull/215 @ediso74 kindly validate