我试图从我的Git工作区推到Github,但我添加和提交的更改似乎没有上传。似乎在“(无分支)”,然后失去了我的变化
然后,做一个“混帐分支”我得到的东西是这样的:
git branch
* (no branch)
master
愚蠢,我以为我可以重新进入主与
git checkout master
,现在我的改变似乎去了。我的主分支大约三天。似乎没有办法切换回这个(没有分支)。
我检查了这个问题Git : seemed to be in “(no branch)” and then lost my changes答案建议做一个git reflog show
然后结帐。我想,我得到这个:
$ git reflog
0f27ae7 [email protected]{1}: checkout: moving from HEAD to master
7b8ee7b [email protected]{2}: commit: 14/05/2017 3:33pm
ff60409 [email protected]{3}: commit: 14/05/2017 3:33pm
0f27ae7 [email protected]{4}: checkout: moving from master to 0f27ae7236aabbe8cccfba82e201e36368a05054
0f27ae7 [email protected]{5}: commit: 11/05/2017 2:33pm
3e4c616 [email protected]{6}: merge origin/master: Fast-forward
1e79818 [email protected]{7}: commit: 10/5//2017 UI
我试着做一结帐从0f27ae7236aabbe8cccfba82e201e36368a05054
但我的变化是不回来了。我想要的是恢复我在(无分支)(承诺:14/05/2017 3:33 pm)作出的最后提交。
这里是git branch -a
结果:
$ git branch -a
* (HEAD detached from 0f27ae7)
UI_linking
master
remotes/ado/newBranch
remotes/origin/UI_linking
remotes/origin/frogs1
remotes/origin/master
remotes/origin/newBranch
remotes/origin/newMas
是我的变化失去了什么?还是有办法恢复它们?
你可以显示git branch -a吗? – DreamInBox
我将它添加到问题中。 –