Add more alternatives to get initial commit hash

This commit is contained in:
S N Munendra 2016-06-30 23:30:27 +05:30
parent be87cde44d
commit 49df61f4b9
2 changed files with 11 additions and 1 deletions

View File

@ -551,6 +551,16 @@ __Alternatives:__
git rev-list --max-parents=0 HEAD
```
```sh
git log --pretty=oneline | tail -1 | cut -c 1-40
```
```sh
git log --pretty=oneline --reverse | head -1 | cut -c 1-40
```
## Visualize the version tree.
```sh
git log --pretty=oneline --graph --decorate --all

View File

@ -198,7 +198,7 @@
}, {
"title": "Retrieve the commit hash of the initial revision.",
"tip": " git rev-list --reverse HEAD | head -1",
"alternatives": ["git rev-list --max-parents=0 HEAD"]
"alternatives": ["git rev-list --max-parents=0 HEAD", "git log --pretty=oneline | tail -1 | cut -c 1-40", "git log --pretty=oneline --reverse | head -1 | cut -c 1-40"]
}, {
"title": "Visualize the version tree.",
"tip": "git log --pretty=oneline --graph --decorate --all",