You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -54,6 +54,7 @@
54
54
*[Archive the `master` branch](https://github.com/git-tips/tips#archive-the-master-branch)
55
55
*[Modify previous commit without modifying the commit message](https://github.com/git-tips/tips#modify-previous-commit-without-modifying-the-commit-message)
56
56
*[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)
57
58
58
59
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
59
60
<!-- @doxie.inject end toc -->
@@ -383,5 +384,10 @@ __Alternatives:__
383
384
git remote prune origin
384
385
```
385
386
387
+
## Retrieve the commit hash of the initial revision.
388
+
```sh
389
+
git rev-list --reverse HEAD | head -1
390
+
```
391
+
386
392
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
0 commit comments