branch? : gitcheckout
每個版本都會有個獨一無二的神秘字串
mudream@HP:~/testgit$ git checkout 2d94
Note: checking out '2d94'.
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 2d94ba7... commit 2
一些神奇的操作
假如想要取消剛剛某個檔案的操作...
例如file.c
mudream@HP: ~/MyFirstGitTest$ git status
#On branch master
#Changed but not updated:
# (use “git add <file>...” to update what will be committed)
#
# modified: file.c
#