Recovering from a failed rebase

前端 未结 1 1130
余生分开走
余生分开走 2021-02-07 02:21

I\'m using git svn to get some git goodness with the company-mandated svn server. I just had a rebase go horribly awry, and I\"m trying to figure out the best way t

相关标签:
1条回答
  • 2021-02-07 03:17

    You should have a look at ORIG_HEAD

    ORIG_HEAD is previous state of HEAD, set by commands that have possibly dangerous behavior, to be easy to revert them.
    It is less useful now that Git has reflog: HEAD@{1} is roughly equivalent to ORIG_HEAD (HEAD@{1} is always last value of HEAD, ORIG_HEAD is last value of HEAD before dangerous operation)

    So try this git reset to get back to before any rebase:

    git reset --hard ORIG_HEAD   
    
    0 讨论(0)
提交回复
热议问题