Git:在交互式变基过程中显示提交列表 [英] Git: Show list of commits during interactive rebase

查看:130
本文介绍了Git:在交互式变基过程中显示提交列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在进行交互式变台.是否有一个命令显示我开始重新设置基准时最初选择的提交列表?

I'm in the middle of an interactive rebase. Is there a command that shows the list of commits that were initially selected when I started the rebase?

推荐答案

在交互式rebase期间,git更新子目录rebase-merge.git目录中的文件(确切的路径在git的各个版本中已更改,正如我所记得的;我现在正在查看git 2.0.x的行为).

During the interactive rebase, git updates files in your .git directory under the sub-directory rebase-merge (the exact path has changed in various versions of git, as I recall; I'm looking at git 2.0.x behavior right now).

在该目录中是文件donegit-rebase-todo.这些不是您所要求的:它们是完成的零件和尚未完成的零件,不是最初显示给您的拾取"命令,也不一定是您使用的命令(如果您跳过了)一些).还有一个git-rebase-todo.backup,其中包含编辑后的"todo"列表中的内容.我不确定您是否需要完整的revs列表或退出编辑器时选择的列表,但是如果是后者,则备份文件是否正确.

In that directory are the files done and git-rebase-todo. These are not quite what you asked for: they're the finished parts and the not-yet-done parts, not the "pick" commands that were presented to you initially, nor necessarily the commands you've gone with (if you skipped some). There's also a git-rebase-todo.backup, which contains what was in the "todo" list after you edited it. I'm not sure if you wanted the complete list of revs or the list you chose at the time you exited the editor, but if it's the latter, the backup file is the right thing.

还有一个名为ORIG_HEAD的引用,该引用指向要重新建立基础的(原始)分支的尖端,而.git/rebase-merge/head-name包含该分支的名称(并且直到重新建立基础为止,该分支才被移动.完全的).您可以使用它以及其他一些文件来重建最初提供的选择"列表.

There is also a reference named ORIG_HEAD that points to the tip of the (original) branch that is being rebased, and .git/rebase-merge/head-name which contains the name of the branch (and the branch is not moved until the rebase is complete). You could use this, plus some of the other files, to reconstruct the originally-offered "pick" list.

这篇关于Git:在交互式变基过程中显示提交列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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