Skip to content

Instantly share code, notes, and snippets.

@seveas
Created February 11, 2015 23:17
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 seveas/2ddeb8a3ecea080fddb0 to your computer and use it in GitHub Desktop.
Save seveas/2ddeb8a3ecea080fddb0 to your computer and use it in GitHub Desktop.
dennis@spirit:~/code/git$ git status
On branch nd/multiple-work-trees
nothing to commit, working directory clean
dennis@spirit:~/code/git$ cat .git/HEAD
ref: refs/heads/nd/multiple-work-trees
dennis@spirit:~/code/git$ 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 b2cc490... git-checkout.txt: a note about multiple checkout support for submodules
dennis@spirit:~/code/git$ git status
HEAD detached at b2cc490
nothing to commit, working directory clean
dennis@spirit:~/code/git$ cat .git/HEAD
b2cc49067b2d3635ef972771523cd77735c6af33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment