From be87cde44dbd0a1945b6b83662ae25d0041be68c Mon Sep 17 00:00:00 2001 From: S N Munendra Date: Wed, 29 Jun 2016 22:10:25 +0530 Subject: [PATCH] Add alternatives to get commit hash of initial revision --- README.md | 6 ++++++ tips.json | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1989cba..cc6d96d 100644 --- a/README.md +++ b/README.md @@ -545,6 +545,12 @@ git remote prune origin git rev-list --reverse HEAD | head -1 ``` + +__Alternatives:__ +```sh +git rev-list --max-parents=0 HEAD +``` + ## Visualize the version tree. ```sh git log --pretty=oneline --graph --decorate --all diff --git a/tips.json b/tips.json index 657b400..3aee552 100644 --- a/tips.json +++ b/tips.json @@ -197,7 +197,8 @@ "alternatives": ["git remote prune origin"] }, { "title": "Retrieve the commit hash of the initial revision.", - "tip": " git rev-list --reverse HEAD | head -1" + "tip": " git rev-list --reverse HEAD | head -1", + "alternatives": ["git rev-list --max-parents=0 HEAD"] }, { "title": "Visualize the version tree.", "tip": "git log --pretty=oneline --graph --decorate --all",