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
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -101,6 +101,7 @@
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>. -->
0 commit comments