Skip to content

Commit be87cde

Browse files
committed
Add alternatives to get commit hash of initial revision
1 parent 45ce83e commit be87cde

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,12 @@ git remote prune origin
545545
git rev-list --reverse HEAD | head -1
546546
```
547547

548+
549+
__Alternatives:__
550+
```sh
551+
git rev-list --max-parents=0 HEAD
552+
```
553+
548554
## Visualize the version tree.
549555
```sh
550556
git log --pretty=oneline --graph --decorate --all

tips.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,8 @@
197197
"alternatives": ["git remote prune origin"]
198198
}, {
199199
"title": "Retrieve the commit hash of the initial revision.",
200-
"tip": " git rev-list --reverse HEAD | head -1"
200+
"tip": " git rev-list --reverse HEAD | head -1",
201+
"alternatives": ["git rev-list --max-parents=0 HEAD"]
201202
}, {
202203
"title": "Visualize the version tree.",
203204
"tip": "git log --pretty=oneline --graph --decorate --all",

0 commit comments

Comments
 (0)