What is rebase autosquash, and how does it work together with fixup/squash commits?
Last updated
Mark fix commits with
git commit --fixup=<hash>or--squash=<hash>, which prefix the message withfixup!orsquash!plus the target commit's subject.git rebase -i --autosquashmatches those prefixes, moves each fix right beneath its target, and presets thefixuporsquashaction automatically.This avoids manual reordering. Enable it by default with
rebase.autosquash true.
- https://elver.me/blog/fixing-commits-with-git-commit-fixup-and-git-rebase-autosquash/
- https://dev.to/mbrehin/git-autofixup-5b3g
- https://github.com/sourcegit-scm/sourcegit/issues/588
- https://resources.criodo.com/resources/git-interactive-rebase/
- https://medium.com/@acparas/git-fixup-autosquash-and-commit-msg-heading-34da171fbcbb
- https://congtuanle.medium.com/git-the-power-of-fixup-autosquash-f1c91f7d962b
- https://git-scm.com/docs/git-rebase
- https://blog.gitbutler.com/git-autosquash