我如何在git中找到下一个提交? [英] How do I find the next commit in git?
本文介绍了我如何在git中找到下一个提交?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
ref ^
引用 ref
之前的提交,那么在之后获取提交 > ref
? 例如,如果我
谢谢。
是的,git是DAG节点指针结构树什么的。 如何在此之后找到提交?
要列出所有提交,当前的,然后是它的孩子,等等 - 基本上是标准的git日志,但按照其他方式,使用类似于 git log --reverse --ancestry-path 894e8b4e93d8f3 ^ .. master
其中894e8b4e93d8f3是您想要显示的第一个提交。
ref^
refers to the commit before ref
, what about getting the commit after ref
?
For example, if I git checkout 12345
how do I check out the next commit?
Thanks.
PS Yes, git's a DAG node pointer struct tree whatever. How do I find the commit after this one?
解决方案
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
where 894e8b4e93d8f3 is the first commit you want to show.
这篇关于我如何在git中找到下一个提交?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文