mirror of
https://github.com/namibia/tips.git
synced 2024-05-29 16:31:08 +00:00
Add more alternatives to get initial commit hash
This commit is contained in:
parent
be87cde44d
commit
49df61f4b9
10
README.md
10
README.md
|
@ -551,6 +551,16 @@ __Alternatives:__
|
||||||
git rev-list --max-parents=0 HEAD
|
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.
|
## Visualize the version tree.
|
||||||
```sh
|
```sh
|
||||||
git log --pretty=oneline --graph --decorate --all
|
git log --pretty=oneline --graph --decorate --all
|
||||||
|
|
|
@ -198,7 +198,7 @@
|
||||||
}, {
|
}, {
|
||||||
"title": "Retrieve the commit hash of the initial revision.",
|
"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"]
|
"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.",
|
"title": "Visualize the version tree.",
|
||||||
"tip": "git log --pretty=oneline --graph --decorate --all",
|
"tip": "git log --pretty=oneline --graph --decorate --all",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user