From 15698a4e2092d8fd0f3000c5016046645dfdb13e Mon Sep 17 00:00:00 2001 From: Andrew Date: Mon, 13 Jun 2016 12:36:12 -0400 Subject: [PATCH] Added another git command --- README.md | 6 ++++++ tips.json | 3 +++ 2 files changed, 9 insertions(+) diff --git a/README.md b/README.md index 24bf42f..646df2f 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@ P.S: All these commands are tested on `git version 2.7.4 (Apple Git-66)`. * [Revert: Undo a commit by creating a new commit](#revert-undo-a-commit-by-creating-a-new-commit) * [Reset: Discard commits, advised for private branch](#reset-discard-commits-advised-for-private-branch) * [Reword the previous commit message](#reword-the-previous-commit-message) +* [See commit history for just the current branch](#see-commit-history-for-just-the-current-branch) * [Amend author.](#amend-author) * [Reset author, after author has been changed in the global config.](#reset-author-after-author-has-been-changed-in-the-global-config) * [Changing a remote's URL](#changing-a-remotes-url) @@ -229,6 +230,11 @@ git reset git commit -v --amend ``` +## See commit history for just the current branch +```sh +git cherry -v master +``` + ## Amend author. ```sh git commit --amend --author='Author Name ' diff --git a/tips.json b/tips.json index b17022d..9edd7a7 100644 --- a/tips.json +++ b/tips.json @@ -62,6 +62,9 @@ }, { "title": "Reword the previous commit message", "tip": "git commit -v --amend" +}, { + "title": "See commit history for just the current branch", + "tip": "git cherry -v master" }, { "title": "Amend author.", "tip": "git commit --amend --author='Author Name '"