GitCommand
Discard File Changes
Type this command
git restore <file>Discards uncommitted changes to a file.
Tip: This permanently loses the uncommitted changes in that file.
The Git command to discard file changes is git restore <file>.
git restore <file>git restore <file>Discards uncommitted changes to a file.
Tip: This permanently loses the uncommitted changes in that file.
Tip: This permanently loses the uncommitted changes in that file.
Run git restore <file>.
Run git restore <file>.
Type it in the terminal or command-line interface used by Git.
Yes. The command text is the same on both platforms when the tool is installed.