且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用撤消git rebase

更新时间:2022-11-16 08:34:33

Assuming you haven't modified the version2 branch since you rebased it, all you need to do is a hard reset of the branch to its 1st prior position, using <reference>@{n} syntax, where n is the Nth prior position of the reference:

git checkout version2
git reset --hard version2@{1}