Which Git commit stats are easy to pull

前端 未结 13 1813
面向向阳花
面向向阳花 2020-12-12 11:23

Previously I have enjoyed TortoiseSvn\'s ability to generate simple commit stats for a given SVN repository. I wonder what is available in Git and am particularly interested

13条回答
  •  天命终不由人
    2020-12-12 11:45

    First, you don't have to pull anything (as in network pull), because you have the whole repository and the whole history locally. I'm pretty sure there are tools that will give you statistics, but sometimes you can just be creative with the command lines. For instance, this (just out of my head) will give you the number of commits per user:

    git log --pretty=format:%ae \
    | gawk -- '{ ++c[$0]; } END { for(cc in c) printf "%5d %s\n",c[cc],cc; }'
    

    Other statistics you asked for may need more thought put into it. You may want to see the tools available. Googling for git statistics points to the GitStats tool, which I have no experience with and even less idea of what it takes to get it run on windows, but you can try.

提交回复
热议问题