我想回去提交一个。我能怎么做?git如何退回提交
$ git reflog
9b2a45e [email protected]{0}: reset: moving to HEAD~1
0c54f19 [email protected]{1}: reset: moving to HEAD~1
b9c157d [email protected]{2}: commit: updated from online
0c54f19 [email protected]{3}: commit: add img from download folder
9b2a45e [email protected]{4}: commit: add images
6fa6e34 [email protected]{5}: clone: from [email protected]:starpix/dojo.git
$ git reset --hard HEAD~1
HEAD is now at 9b2a45e add images
我想回到“从网上更新”。我怎么能够?
复位命令是使用了理想的,所以你仍然可以得到您的分支来跟踪更改。你可以使用--soft或者--mixed开关来防止你在舞台或者工作区域跳过变化,否则--hard已经足够好了 – maxmelbin