Merge pull request #49 from munendrasn/master

merge previous two commits into one.
This commit is contained in:
hemanth.hm 2016-05-19 21:23:32 -07:00
commit 67f84e141c
2 changed files with 9 additions and 0 deletions

View File

@ -101,6 +101,7 @@
* [File diff between staging and the last file version.](https://github.com/git-tips/tips#file-diff-between-staging-and-the-last-file-version) * [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) * [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) * [List only the root and merge commits.](https://github.com/git-tips/tips#list-only-the-root-and-merge-commits)
* [Merge previous two commits into one.](https://github.com/git-tips/tips#merge-previous-two-commits-into-one)
<!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. --> <!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
<!-- @doxie.inject end toc --> <!-- @doxie.inject end toc -->
@ -689,5 +690,10 @@ git show <banch_name>:<file_name>
git log --first-parent git log --first-parent
``` ```
## Merge previous two commits into one.
```sh
git rebase --interactive HEAD~2
```
<!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. --> <!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
<!-- @doxie.inject end --> <!-- @doxie.inject end -->

View File

@ -308,4 +308,7 @@
}, { }, {
"title": "List only the root and merge commits.", "title": "List only the root and merge commits.",
"tip": "git log --first-parent" "tip": "git log --first-parent"
}, {
"title": "Merge previous two commits into one.",
"tip": "git rebase --interactive HEAD~2"
}] }]