root and merge commits tips.

This commit is contained in:
Hemanth.HM 2016-05-11 22:24:34 +05:30
parent b238e44ff1
commit dc8e9d6f96
2 changed files with 9 additions and 0 deletions

View File

@ -100,6 +100,7 @@
* [Checkout a new branch without any history](https://github.com/git-tips/tips#checkout-a-new-branch-without-any-history)
* [File diff between staging and the last file version.](https://github.com/git-tips/tips#file-diff-between-staging-and-the-last-file-version)
* [Extract file from another branch.](https://github.com/git-tips/tips#extract-file-from-another-branch)
* [List only the root and merge commits.](https://github.com/git-tips/tips#list-only-the-root-and-merge-commits)
<!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
<!-- @doxie.inject end toc -->
@ -683,5 +684,10 @@ git diff --staged
git show <banch_name>:<file_name>
```
## List only the root and merge commits.
```sh
git log --first-parent
```
<!-- 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

@ -305,4 +305,7 @@
},{
"title": "Extract file from another branch.",
"tip": "git show <banch_name>:<file_name>"
}, {
"title": "List only the root and merge commits.",
"tip": "git log --first-parent"
}]