Skip to content

Instantly share code, notes, and snippets.

@cuonghuynh
Created September 5, 2018 06:51
Show Gist options
  • Save cuonghuynh/dcbce40be59a538d3a12fe6d9efe0769 to your computer and use it in GitHub Desktop.
Save cuonghuynh/dcbce40be59a538d3a12fe6d9efe0769 to your computer and use it in GitHub Desktop.
Git discard your changes not staged on local by command
# check status
> git status
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: hello.html
# discard changes
> git checkout hello.html
# check status
> git status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment