我用更新检出了另一个分支,然后做了一些更改,切换回主Git,现在变化消失了!我可以让他们回来吗?终端基本上是:如何从'分离头状态'恢复提交?
$ git commit
[detached HEAD 7c09e17] Fixed some stuff
files changed, insertions(+), deletions(-)
$ git push master
fatal: 'master' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
$ git checkout master
Previous HEAD position was 7c09e17... Fixed some stuff
Switched to branch 'master'
$ git merge theother/directory
dup http://stackoverflow.com/questions/4845505/gitx-how-do-i-get-my-detached-head-commits-back-into-master? – smparkes 2012-01-27 22:56:19