[英]Eclipse Git | Reverting merge commit
Using Eclipse Git (the one bundled by default on Eclipse Mars.1 - JavaEE version), is it still possible to remove/delete a wrong merge commit? 使用Eclipse Git(在Eclipse Mars.1-JavaEE版本默认捆绑的版本)中,是否仍然可以删除/删除错误的合并提交?
Since I'm still new to the UI of Eclipse Git coming from a terminal user, I accidentally merge the wrong branch dev-release
to a dev-master
. 由于我仍然是来自终端用户的Eclipse Git UI的新手,所以我不小心将错误的分支
dev-release
合并到dev-master
。 Which should have been the other way around. 反之亦然。 Luckily I haven't pushed yet that merge commit to remote.
幸运的是,我还没有将合并提交推送到远程。
My question is, is it possible to undo the merge commit using Eclipse Git only? 我的问题是,是否可以仅使用Eclipse Git撤消合并提交?
Git history git历史
Current situation 现在的情况
dev-release E - F - G
/ \
dev-master A - B - C - D - H
Expected result 预期结果
dev-release E - F - G - H
/ /
dev-master A - B - C - D
您应该能够硬重置dev-master
以从“ 历史记录”视图中提交D
,然后根据需要在dev-release
上重做合并。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.