You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

GitLab撤销合并时,“Revert in branch”下拉选哪个分支?

How to Pick the Right Branch in the "Revert in branch" Dropdown for Undoing a Merge

Got it, let's clear this up for you—you accidentally merged test-1 into Master and need to undo that merge, and you're stuck on which branch to select in the dropdown? Totally understandable, let's break it down simply:

First, let's clarify what that dropdown does: it's asking which branch you want to apply the revert commit to. Since your goal is to fix the Master branch (the one that got the accidental merge), here's what you should choose:

  • If you're currently checked out to Master (which is probably the case, since you just merged into it), select Master directly. This will create a new commit on Master that undoes all the changes brought in by the test-1 merge. Your Master branch will go back to exactly how it was before the merge happened.
  • If you want to play it safe and test the revert first (before touching Master), you can create a new branch from Master (like revert-test-merge) first, then select that new branch in the dropdown. Once you verify the revert works as expected, you can merge this test branch back into Master.

A quick note: Reverting the merge won't delete anything from your test-1 branch—all its changes are still intact. If you later decide you do want to merge test-1 into Master, you can do that normally (you might just need to resolve any new conflicts if Master has changed since the revert).

内容的提问来源于stack exchange,提问作者lynxx

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.11 07:50:44