From 3048cfb182678c35c38b5f7dce6298ca27911fb1 Mon Sep 17 00:00:00 2001 From: Pratyush Date: Mon, 17 Aug 2015 00:48:33 +0530 Subject: [PATCH] add git cherry tip --- README.md | 14 +++++++++++++- tips.json | 5 +++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4eb758c..e4ec12e 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,7 @@ * [Forcefully remove untracked files](https://github.com/git-tips/tips#forcefully-remove-untracked-files) * [Forcefully remove untracked directory](https://github.com/git-tips/tips#forcefully-remove-untracked-directory) * [Update all the submodules](https://github.com/git-tips/tips#update-all-the-submodules) +* [Show all commits in the current branch yet to be merged to master](https://github.com/git-tips/tips#show-all-commits-in-the-current-branch-yet-to-be-merged-to-master) @@ -204,7 +205,7 @@ git log --no-merges --stat --reverse master.. ## Pick commits across branches using cherry-pick ```sh -git checkout && git cherry-pick +git checkout && cherry-pick ``` ## Find out branches containing commit-hash @@ -329,5 +330,16 @@ git clean -df git submodule foreach git pull ``` +## Show all commits in the current branch yet to be merged to master +```sh +git cherry -v master +``` + + +__Alternatives:__ +```sh +git cherry -v master +``` + diff --git a/tips.json b/tips.json index e9490ec..8afe58e 100644 --- a/tips.json +++ b/tips.json @@ -186,5 +186,10 @@ { "title": "Update all the submodules", "tip": "git submodule foreach git pull" + }, + { + "title": "Show all commits in the current branch yet to be merged to master", + "tip": "git cherry -v master", + "alternatives": ["git cherry -v master "] } ]