Slide 61
Slide 61 text
imaizume@mac ~/dots (master) $ git checkout HEAD~1
Note: checking out 'HEAD~1'.
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
HEAD is now at 8952c2c... Update Readme
imaizume@mac ~/dots (cdc8446) $ cd .git
imaizume@mac ~/dots/.git (cdc8446) $ ls -a
. COMMIT_EDITMSG HEAD branches description index
logs packed-refs tags.lock
.. FETCH_HEAD ORIG_HEAD config hooks info
objects refs
imaizume@mac ~/dots/.git (cdc8446) $ cat HEAD
cdc84468952c2cb2c8cebe819cbea64f0654eae4
imaizume@mac ~/dots/.git (cdc8446) $ cat refs/heads/master
40f1d950027fd7d2efbba17576402610adf1e6cc
commit を checkout した状態
(detached HEAD)
HEAD =/=> master