简体   繁体   English

git删除远程合并和分支

[英]Git remove remote merge and branch

I have been working on my develop branch. 我一直在我的开发部门工作。 I checked out branch 'branch-xxx', commit my changes and then merged the branch on develop, only to find out that this piece of code is buggy! 我签出了分支“ branch-xxx”,提交了更改,然后在development上合并了该分支,才发现这段代码有问题!

How can I undo the merge and remove the branch? 如何撤消合并并删除分支?

I checked out Undo a Git merge that hasn't been pushed yet But even though it seems I am indeed moving to the previous commit, I can't figure out how to push this to the remote. 我签出了“ 撤消尚未推送的Git合并”,但是即使我确实确实在移至上一个提交,我也无法弄清楚如何将其推送到远程。

You simply reset your develop branch to state before merge. 您只需将自己的develop分支重置为合并前的状态。 Then delete your 'branch-xxx'. 然后删除您的“ branch-xxx”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM