發表文章

目前顯示的是 十一月, 2014的文章

怎麼回復已經Rebase的Git Repository

Reference : 1. http://www.atlassian.com/git/tutorials/rewriting-history/git-reflog2. http://stackoverflow.com/questions/134882/undoing-a-git-rebase
利用git的reflog來找出要回復的commit$> git reflog0a2e358 HEAD@{0}: reset: moving to HEAD~2 0254ea7 HEAD@{1}: checkout: moving from 2.2 to master c10f740 HEAD@{2}: checkout: moving from master to 2.2如果要回復到HEAD@{1}就執行下面的指令$> git reset --hard HEAD@{1}