-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Description
The "undo things" section mention that:
"It’s important to understand that git restore --staged <file>
is a dangerous command. Any local changes you made to that file are gone — Git just replaced that file with the most recently-committed version. Don’t ever use this command unless you absolutely know that you don’t want those unsaved local changes."
I realised that the warrning added is more about the git restore <file>
command.
Indeed, this command throw away my local work.
The git restore --staged <file>
command, however, unstage the file in question.
The only thing I found about it is this comment, originally posted by @HonkingGoose in the pull request conversation.
Do I missed something?
Do we need to remove the --staged
flag?
HonkingGooseHonkingGoose
Metadata
Metadata
Assignees
Labels
No labels