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
+10Lines changed: 10 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -48,6 +48,7 @@ A collection of cool hidden and not so hidden features of Git and GitHub. This c
48
48
-[Styled Git Log](#styled-git-log)
49
49
-[Git Query](#git-query)
50
50
-[Merged Branches](#merged-branches)
51
+
-[Fixup and Autosquash](#fixup-and-autosquash)
51
52
-[Web Server for Browsing Local Repositories](#web-server-for-browsing-local-repositories)
52
53
-[Git Configurations](#git-configurations)
53
54
-[Aliases](#aliases)
@@ -637,6 +638,15 @@ Will give you a list of branches that have not been merged into your current bra
637
638
638
639
[*Read more about the Git `branch` command.*](http://git-scm.com/docs/git-branch)
639
640
641
+
### Fixup and Autosquash
642
+
If there is something wrong with a previous commit (can be one or more from HEAD), for example `abcde`, run the following command after you've amended the problem:
643
+
```bash
644
+
$ git commit --fixup=abcde
645
+
$ git rebase abcde^ --autosquash -i
646
+
```
647
+
[*Read more about the Git `commit` command.*](http://git-scm.com/docs/git-commit)
648
+
[*Read more about the Git `rebase` command.*](http://git-scm.com/docs/git-rebase)
649
+
640
650
### Web Server for Browsing Local Repositories
641
651
Use the Git `instaweb` command to instantly browse your working repository in `gitweb`. This command is a simple script to set up `gitweb` and a web server for browsing the local repository.
0 commit comments