如何在git中找到下一个提交? (裁判的子女) [英] How do I find the next commit in git? (child/children of ref)

查看:82
本文介绍了如何在git中找到下一个提交? (裁判的子女)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ref^是指ref之前的提交,那么如何在之后 ref之后获得提交?

ref^ refers to the commit before ref, what about getting the commit after ref?

例如,如果我git checkout 12345如何检查下一次提交?

For example, if I git checkout 12345 how do I check out the next commit?

谢谢.

PS是的,无论如何git都是DAG节点指针结构树. 如何在此之后找到提交?

PS Yes, git's a DAG node pointer struct tree whatever. How do I find the commit after this one?

推荐答案

要列出所有提交,从当前提交开始,然后是其子提交,依此类推-基本上是标准的git log,但是要及时进行,使用类似

To list all the commits, starting from the current one, and then its child, and so on - basically standard git log, but going the other way in time, use something like

git log --reverse --ancestry-path 894e8b4e93d8f3^..master

其中894e8b4e93d8f3是您要显示的第一个提交.

where 894e8b4e93d8f3 is the first commit you want to show.

这篇关于如何在git中找到下一个提交? (裁判的子女)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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