Skip to content

Instantly share code, notes, and snippets.

@kazuho
Last active August 29, 2015 13:57
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 kazuho/9798307 to your computer and use it in GitHub Desktop.
Save kazuho/9798307 to your computer and use it in GitHub Desktop.
$ git status
# On branch master
nothing to commit, working directory clean
$ DYLD_INSERT_LIBRARIES=../../unco.dylib DYLD_FORCE_FLAT_NAMESPACE=YES git checkout HEAD^
Note: checking out 'HEAD^'.
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 664f582... first commit
$ git status
# HEAD detached at 664f582
nothing to commit, working directory clean
$ ../../unco undo ~/.unco-log | sh -e
$ git status
# On branch master
nothing to commit, working directory clean
$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment