Created
August 3, 2015 01:56
-
-
Save deostroll/1b1dbbed7ad93e1738c4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git log --oneline | |
09232b1 initial commit | |
f1edfaf initial commit | |
ddb9834 Initial commit | |
$ git checkout f1edfaf | |
Note: checking out 'f1edfaf'. | |
You are in 'detached HEAD' state. You can look around, make experimental | |
changes and commit them, and you can discard any commits you make in this | |
state without impacting any branches by performing another checkout. | |
If you want to create a new branch to retain commits you create, you may | |
do so (now or later) by using -b with the checkout command again. Example: | |
git checkout -b <new-branch-name> | |
HEAD is now at f1edfaf... initial commit | |
$ ls | |
index.html main.js README.md | |
$ git status | |
HEAD detached at f1edfaf | |
nothing to commit, working directory clean | |
$ git commit -m "reverted" | |
HEAD detached at f1edfaf | |
nothing to commit, working directory clean | |
$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment