diff --git a/README.md b/README.md index fd4eb42..95bdcac 100644 --- a/README.md +++ b/README.md @@ -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) @@ -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 +``` + ## Number of commits in a branch ```sh git rev-list --count diff --git a/tips.json b/tips.json index 0d63138..0c35cd8 100644 --- a/tips.json +++ b/tips.json @@ -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 " },{ "title": "Number of commits in a branch", "tip": "git rev-list --count "