Skip to content

Commit e9e75fe

Browse files
committed
commit hash of the initial revision
1 parent ca58c81 commit e9e75fe

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
* [Archive the `master` branch](https://github.com/git-tips/tips#archive-the-master-branch)
5555
* [Modify previous commit without modifying the commit message](https://github.com/git-tips/tips#modify-previous-commit-without-modifying-the-commit-message)
5656
* [Purnes branches that have been deleted in the remote.](https://github.com/git-tips/tips#purnes-branches-that-have-been-deleted-in-the-remote)
57+
* [Retrieve the commit hash of the initial revision.](https://github.com/git-tips/tips#retrieve-the-commit-hash-of-the-initial-revision)
5758

5859
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
5960
<!-- @doxie.inject end toc -->
@@ -383,5 +384,10 @@ __Alternatives:__
383384
git remote prune origin
384385
```
385386

387+
## Retrieve the commit hash of the initial revision.
388+
```sh
389+
git rev-list --reverse HEAD | head -1
390+
```
391+
386392
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
387393
<!-- @doxie.inject end -->

tips.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,5 +213,9 @@
213213
"title": "Purnes branches that have been deleted in the remote.",
214214
"tip": "git fetch -p",
215215
"alternatives":["git remote prune origin"]
216+
},
217+
{
218+
"title": "Retrieve the commit hash of the initial revision.",
219+
"tip": " git rev-list --reverse HEAD | head -1"
216220
}
217221
]

0 commit comments

Comments
 (0)