From dc8e9d6f963b0455a6c7146d7afca347ebf61bb9 Mon Sep 17 00:00:00 2001 From: "Hemanth.HM" Date: Wed, 11 May 2016 22:24:34 +0530 Subject: [PATCH] root and merge commits tips. --- README.md | 6 ++++++ tips.json | 3 +++ 2 files changed, 9 insertions(+) diff --git a/README.md b/README.md index 98e8cf2..b08f264 100644 --- a/README.md +++ b/README.md @@ -100,6 +100,7 @@ * [Checkout a new branch without any history](https://github.com/git-tips/tips#checkout-a-new-branch-without-any-history) * [File diff between staging and the last file version.](https://github.com/git-tips/tips#file-diff-between-staging-and-the-last-file-version) * [Extract file from another branch.](https://github.com/git-tips/tips#extract-file-from-another-branch) +* [List only the root and merge commits.](https://github.com/git-tips/tips#list-only-the-root-and-merge-commits) @@ -683,5 +684,10 @@ git diff --staged git show : ``` +## List only the root and merge commits. +```sh +git log --first-parent +``` + diff --git a/tips.json b/tips.json index 9508db3..f6af834 100644 --- a/tips.json +++ b/tips.json @@ -305,4 +305,7 @@ },{ "title": "Extract file from another branch.", "tip": "git show :" +}, { + "title": "List only the root and merge commits.", + "tip": "git log --first-parent" }]