Skip to content

Instantly share code, notes, and snippets.

Created February 10, 2017 20:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/a1b4a7b0f5cf7fd3a4e6272f5e8fc1a0 to your computer and use it in GitHub Desktop.
Save anonymous/a1b4a7b0f5cf7fd3a4e6272f5e8fc1a0 to your computer and use it in GitHub Desktop.
git status
(use "git reset HEAD ... to ...)
... modified: somewhere/somefile
git checkout -- somewhere/somefile
git status
(use "git reset HEAD ... to ...)
... modified: somewhere/somefile
git reset HEAD somewhere/somefile
git status
HEAD detached at cf639d6
nothing to commit, working tree clean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment