如何在签出第一次提交后列出所有的git分支?第一次提交Git结账
例如
git log --oneline
显示我所有的分支:
06c4b5c Version 3 of Hello World
efa167f Version 2 of Hello World
47a33c8 Hello World
如果我看看我的第一次提交
git checkout 47a33c8
显示此消息
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...
那么,如果我这样做:
git log --oneline
只有一次提交现在显示:
47a33c8 Hello World
我的问题是,如果我不知道HEAD的是在06c4b5c位置原本,如何在检查完第一次提交后我是否返回到这个位置?
而且,当我尝试签06c4b5c
git checkout 06c4b5c
对于第二个问题,请尝试通过其完整提交散列(在'git log'中)检查它。 – nneonneo 2013-03-20 00:49:15