我正在开发一个开发分支和两个不同的(本地)功能分支。
a -- b -- e <-- develop
\ \
\ f -- g <-- feature-branch-1
\
c -- d <-- feature-branch-2
我通过运行将 feature-branch-1 的更改合并到 feature-branch-2
git checkout feature-branch-2
git rebase feature-branch-1
如果我理解正确,它现在看起来像这样:
a -- b -- e <-- develop
|\
| f -- g <-- feature-branch-1
\
f -- g -- c -- d <-- feature-branch-2
但是,我随后意识到我在分支 1 中引入了一个我不知道如何修复的错误。所以这个错误现在也在分支 2 中,并且阻止我将 feature-branch-2 合并到开发中。我想回到原来的状态
a -- b -- e <-- develop
\ \
\ f -- g <-- feature-branch-1
\
c -- d <-- feature-branch-2
这样我就可以安全地将 feature-branch-2 合并到开发中。我怎样才能做到这一点?