When I am done with a feature, often what I would like is to auto-fixup a commit followed by a force-push to a remote origin before a merge to master.
I end up rebasing on top of master so I can fixup a commit, because I found a tiny thing I want to change and I don't want that change as a separate commit. So I rebase interactively, I fixup the last commit, then I force push. Is there a way to do that in one step?
You can save the step of editing the list of commits manually in rebase -i using git commit --fixup <commit> when making your fixup commit. Then, if rebase.autoSquash is set to true, git rebase -i will automatically turn the line containing this commit into a fixup line right below the commit to fix.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With