是否在中止后恢复上一个交互式rebase TODO? [英] Recover last interactive rebase TODO after abort?

查看:55
本文介绍了是否在中止后恢复上一个交互式rebase TODO?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

比方说,我正在对一个包含约20个提交的分支进行交互式变基.在TODO文件中,我压缩,重新编写单词并重新排序提交.总而言之,设置此基础需要进行大量工作,因为还有很多工作要做.

Let's say I'm doing an interactive rebase of a branch containing around 20 commits. In the TODO file, I squash, reword, and reorder commits. All together it's a lot of work to setup this rebase because there is a bunch to do.

在进行重新设置的过程中,我感到有些困惑.我通过执行 git rebase --abort 来取消变基.我再次重新启动了rebase来完成它,因为我在整个过程中弄乱了一次提交(也许我解决了一个冲突,直到后来在rebase过程中才意识到它).

Over half way through the rebase, I bork something. I cancel the rebase by doing git rebase --abort. I start the rebase again to do it all over, because I messed up a single commit along the way (maybe I resolved a conflict poorly and didn't realize it until later through the rebase process).

现在,我必须重新编辑TODO.Git是否不记得我配置的最后一个TODO文件?它不记得我改写的提交消息了​​吗?

Now I have to edit the TODO all over again. Does Git not remember the last TODO file I configured? Can it not remember the commit messages I reworded?

也许一个更简单的问题是,不是为了解决一个简单的错误而中止整个重新部署,而是有办法将交互式重新部署倒回几步并从该点重新开始?

Perhaps a more simple question is, instead of aborting a whole rebase just to fix a simple mistake, is there perhaps a way to just rewind the interactive rebase back a few steps and restart from that point?

推荐答案

老实说,在这段时间之后,我再也没有找到一个好的内置解决方案.我今天使用的技术实际上非常简单.

Honestly after all this time, I never found a good built-in solution for this. The technique I use today is quite simple actually.

根据需要设置基准后,在保存和关闭文件之前,复制并复制文件.将全部内容粘贴到另一个临时记事本窗口中.

After setting up the rebase how you want, before saving and closing the file, copy & paste the whole contents to another temp notepad window.

如果您需要完全中止重新配置并稍后再试,只需复制&将内容从临时窗口粘贴回.为我工作!

If you need to completely abort the rebase and try it again later, just copy & paste the contents back from the temp window. Works for me!

这篇关于是否在中止后恢复上一个交互式rebase TODO?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆