意外承诺如何在Magit Emacs中无法推送未提交的提交 [英] Accidental commit; how to not push an unpushed commit in Magit Emacs
本文介绍了意外承诺如何在Magit Emacs中无法推送未提交的提交的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在magit状态下,它显示:
未冲洗的提交:
fe73b07更新gitignore
974e70d测试
ab333e6试图用扁平结构
我该怎么办?
奖金:其实我只是想保留这个提交中的更新gitignore。
解决方案
点击测试,按 E 开始一个rebase。 M-n 两个交换提交。 C-C C-C 来完成。
解决合并冲突(如果有的话)。
I did an accidental commit which really makes no sense to have anywhere in history. How can I remove this commit from existence (especially I don't want it appear remotely).
In the magit-status, it shows:
Unpushed commits:
fe73b07 updated gitignore
974e70d test
ab333e6 trying to go with a flat structure
What can I do?
Bonus: actually, I just want to keep the "updated gitignore" from this commit.
解决方案
Point at test, press E to start a rebase. M-n two swap commits. C-c C-c to finalize. Resolve merge conflicts if any and done.
这篇关于意外承诺如何在Magit Emacs中无法推送未提交的提交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文