Git Command1

git¿¡¼­ °ú°Å ¸®ºñÁ¯À̵¿ ÈÄ °ú°Å ÁöÁ¡À» ±âÁØÀ¸·Î ºê·£Ä¡¸¦ ¸¸µé¾î º¸ÀÚ.

¸ÕÀú c13 ·Î±×ÀÇ À§Ä¡·Î À̵¿Çغ¸ÀÚ.



´ÙÀ½°ú °°ÀÌ ÀÔ·ÂÇÏ¸é °ú°Å ÁöÁ¡À¸·Î À̵¿ÇÑ´Ù.

git checkout [SHA1 ID¸¦ ÀÔ·Â]

dev@mypc MINGW64 /d/git_test/gittest (master)
$ git checkout 8af9

°á°ú È­¸éÀº ´ÙÀ½°ú °°´Ù.

dev@mypc MINGW64 /d/git_test/gittest (master)
$ git checkout 8af9
Note: checking out '8af9'.

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 8af933c... c13

dev@mypc MINGW64 /d/git_test/gittest ((8af933c...))
$


°ú°Å ÁöÁ¡À» ±âÁØÀ¸·Î ºê·£Ä¡¸¦ ¸¸µé¼öµµ ÀÖ´Ù.
¿ø°Ý ÀúÀå¼Ò·Î ºê·£Ä¡¸¦ push ÇÑ´Ù.

dev@mypc MINGW64 /d/git_test/gittest ((8af933c...))
$ git checkout -b toold
Switched to a new branch 'toold'

dev@mypc MINGW64 /d/git_test/gittest (toold)
$git push origin toold

¿ø·¡ ÁöÁ¡À¸·Î µ¹¾Æ¿À´Â ¹æ¹ýÀÌ´Ù.

git checkout master

10´Ü°è ÀüÀ¸·Î À̵¿ ÇÑ´Ù.

git checkout HEAD~10