File tree 2 files changed +9
-0
lines changed
2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 101
101
* [ File diff between staging and the last file version.] ( https://github.com/git-tips/tips#file-diff-between-staging-and-the-last-file-version )
102
102
* [ Extract file from another branch.] ( https://github.com/git-tips/tips#extract-file-from-another-branch )
103
103
* [ List only the root and merge commits.] ( https://github.com/git-tips/tips#list-only-the-root-and-merge-commits )
104
+ * [ Merge previous two commits into one.] ( https://github.com/git-tips/tips#merge-previous-two-commits-into-one )
104
105
105
106
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
106
107
<!-- @doxie.inject end toc -->
@@ -689,5 +690,10 @@ git show <banch_name>:<file_name>
689
690
git log --first-parent
690
691
```
691
692
693
+ ## Merge previous two commits into one.
694
+ ``` sh
695
+ git rebase --interactive HEAD~2
696
+ ```
697
+
692
698
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
693
699
<!-- @doxie.inject end -->
Original file line number Diff line number Diff line change 308
308
}, {
309
309
"title" : " List only the root and merge commits." ,
310
310
"tip" : " git log --first-parent"
311
+ }, {
312
+ "title" : " Merge previous two commits into one." ,
313
+ "tip" : " git rebase --interactive HEAD~2"
311
314
}]
You can’t perform that action at this time.
0 commit comments