Skip to content

Git:Rev-list

Example

To count the commits for the branch you are on:

$ git rev-list --count HEAD

for a branch:

$ git rev-list --count <branch-name>

If you want to count the commits on a branch that are made since you created the branch:

$ git rev-list --count HEAD ^<branch-name>

Favorite site