如何检索完整项目的所有提交,提交者和提交时间? [英] How to retrieve all commits, committer and commit time for a complete project?
问题描述
是否有任何方法可以获取项目的提交数据,如下所示:
commit1 committer commit_time
commit2 committer commit_time
commit3 committer commit_time
。
。
。
git shortlog仅给出用户提交的数量,git log为每个提交提供多个语句。
<为了这个目的,我想你要使用 git log
。例如:
git log --pretty = format:%H%aN%ai--all
注意:您说的是提交者,但我认为您的意思是作者。所以上面显示了作者的名字和时间。如果你确实是提交者,那么你可能想要这样:
git log --pretty = format:%H%cN% ci--all
查看 git-log
手册页在PRETTY FORMATS部分获取更多信息可以传递给格式。
Is there any way to get the commit data for a project as follows:
commit1 committer commit_time
commit2 committer commit_time
commit3 committer commit_time
.
.
.
git shortlog only gives the number of commits by user and git log gives multiple statements for each individual commit.
I think you want to use git log
for this purpose. Something like:
git log --pretty=format:"%H %aN %ai" --all
Note: you said committer, but I think you mean author. So the above shows the author name and time. If you really mean committer, then you probably want this:
git log --pretty=format:"%H %cN %ci" --all
Look at the git-log
man page in the "PRETTY FORMATS" section for more information on what options you can pass to format.
这篇关于如何检索完整项目的所有提交,提交者和提交时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!