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
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,6 +55,7 @@ A collection of cool hidden and not so hidden features of Git and GitHub. This c
55
55
-[Styled Git Log](#styled-git-log)
56
56
-[Git Query](#git-query)
57
57
-[Merged Branches](#merged-branches)
58
+
-[Fixup and Autosquash](#fixup-and-autosquash)
58
59
-[Web Server for Browsing Local Repositories](#web-server-for-browsing-local-repositories)
59
60
-[Git Configurations](#git-configurations)
60
61
-[Aliases](#aliases)
@@ -722,6 +723,15 @@ Will give you a list of branches that have not been merged into your current bra
722
723
723
724
[*Read more about the Git `branch` command.*](http://git-scm.com/docs/git-branch)
724
725
726
+
### Fixup and Autosquash
727
+
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:
728
+
```bash
729
+
$ git commit --fixup=abcde
730
+
$ git rebase abcde^ --autosquash -i
731
+
```
732
+
[*Read more about the Git `commit` command.*](http://git-scm.com/docs/git-commit)
733
+
[*Read more about the Git `rebase` command.*](http://git-scm.com/docs/git-rebase)
734
+
725
735
### Web Server for Browsing Local Repositories
726
736
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