This commit is contained in:
Hemanth.HM 2016-08-14 18:14:08 +00:00
parent 3357955baa
commit 08096c7c71
2 changed files with 9 additions and 0 deletions

View File

@ -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)
* [Revert: Reverting an entire merge](#revert-reverting-an-entire-merge)
* [Number of commits in a branch](#number-of-commits-in-a-branch)
<!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
@ -931,6 +932,11 @@ git log --author='_Your_Name_Here_' --pretty=tformat: --numstat | awk '{ add +=
", add, subs, loc }' - # on Mac OSX
```
## Revert: Reverting an entire merge
```sh
git revert -m 1 <commit-ish>
```
## Number of commits in a branch
```sh
git rev-list --count <branch-name>

View File

@ -397,6 +397,9 @@
"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": "Revert: Reverting an entire merge",
"tip": "git revert -m 1 <commit-ish>"
},{
"title": "Number of commits in a branch",
"tip": "git rev-list --count <branch-name>"