commit hash of the initial revision

This commit is contained in:
Hemanth.HM 2015-08-28 18:17:40 +05:30
parent ca58c81f63
commit e9e75fed9e
2 changed files with 10 additions and 0 deletions

View File

@ -54,6 +54,7 @@
* [Archive the `master` branch](https://github.com/git-tips/tips#archive-the-master-branch)
* [Modify previous commit without modifying the commit message](https://github.com/git-tips/tips#modify-previous-commit-without-modifying-the-commit-message)
* [Purnes branches that have been deleted in the remote.](https://github.com/git-tips/tips#purnes-branches-that-have-been-deleted-in-the-remote)
* [Retrieve the commit hash of the initial revision.](https://github.com/git-tips/tips#retrieve-the-commit-hash-of-the-initial-revision)
<!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
<!-- @doxie.inject end toc -->
@ -383,5 +384,10 @@ __Alternatives:__
git remote prune origin
```
## Retrieve the commit hash of the initial revision.
```sh
git rev-list --reverse HEAD | head -1
```
<!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
<!-- @doxie.inject end -->

View File

@ -213,5 +213,9 @@
"title": "Purnes branches that have been deleted in the remote.",
"tip": "git fetch -p",
"alternatives":["git remote prune origin"]
},
{
"title": "Retrieve the commit hash of the initial revision.",
"tip": " git rev-list --reverse HEAD | head -1"
}
]