开发者

How do I delete a merge from github, permanently?

开发者 https://www.devze.com 2023-01-27 18:11 出处:网络
I accidently merged a project with another project that had nothing to do with it, which I didn\'t want to do. I successfully unmerged the projects. However, now I 开发者_如何学运维want to delete the

I accidently merged a project with another project that had nothing to do with it, which I didn't want to do. I successfully unmerged the projects. However, now I 开发者_如何学运维want to delete the erroneous commits. How do I do this.

I tried using git rebase, but it doesn't display the merge.


If you have already successfully unmerged the projects (which I assume you did through a git reset --hard HEAD~N), then you need to force the changes onto the "mainline" via a:

git push -f

Please note that this isn't generally advised unless you know for sure that no one pulled from the "mainline" after you accidentally made an undesired commit.

0

精彩评论

暂无评论...
验证码 换一张
取 消