如何在一个git存储库中找到最新的提交? [英] How to find the latest commits in one git repository?

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

问题描述

我有一个git存储库,有许多分支,有许多提交,我想找到最新的10个提交,如何做到这一点,谢谢!

I have one git repository, there are many branches many commits, I want to find the latest 10 commits, how to do this , thanks!

推荐答案

如果要提交所有分支,则需要--all参数,将git log限制为-10,并使用--date-order告诉git日志以按日期对提交进行排序.

If you want commits for all branches you need the --all argument, limit git log to ten with -10 and use --date-order to tell git log to sort the commits with respect to date.

git log -10 --all --date-order

这篇关于如何在一个git存储库中找到最新的提交?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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