mirror of
https://github.com/namibia/tips.git
synced 2024-11-05 21:07:53 +00:00
count commits in a branch (#122)
This commit is contained in:
parent
d155ea094e
commit
81040e9500
@ -136,6 +136,7 @@ P.S: All these commands are tested on `git version 2.7.4 (Apple Git-66)`.
|
||||
* [Group commits by authors and title](#group-commits-by-authors-and-title)
|
||||
* [Forced push but still ensure you don't overwrite other's work](#forced-push-but-still-ensure-you-dont-overwrite-others-work)
|
||||
* [Show how many lines does an author contribute](#show-how-many-lines-does-an-author-contribute)
|
||||
* [Number of commits in a branch](#number-of-commits-in-a-branch)
|
||||
|
||||
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
||||
<!-- @doxie.inject end toc -->
|
||||
@ -930,5 +931,10 @@ git log --author='_Your_Name_Here_' --pretty=tformat: --numstat | awk '{ add +=
|
||||
", add, subs, loc }' - # on Mac OSX
|
||||
```
|
||||
|
||||
## Number of commits in a branch
|
||||
```sh
|
||||
git rev-list --count <branch-name>
|
||||
```
|
||||
|
||||
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
||||
<!-- @doxie.inject end -->
|
||||
|
@ -397,4 +397,7 @@
|
||||
"title": "Show how many lines does an author contribute",
|
||||
"tip": "git log --author='_Your_Name_Here_' --pretty=tformat: --numstat | gawk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf \"added lines: %s removed lines: %s total lines: %s\n\", add, subs, loc }' -",
|
||||
"alternatives": ["git log --author='_Your_Name_Here_' --pretty=tformat: --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf \"added lines: %s, removed lines: %s, total lines: %s\n\", add, subs, loc }' - # on Mac OSX"]
|
||||
},{
|
||||
"title": "Number of commits in a branch",
|
||||
"tip": "git rev-list --count <branch-name>"
|
||||
}]
|
||||
|
Loading…
Reference in New Issue
Block a user