Warning: Some posts on this platform may contain adult material intended for mature audiences only. Viewer discretion is advised. By clicking ‘Continue’, you confirm that you are 18 years or older and consent to viewing explicit content.
I try to structure my commits in a way that minimizes their blast radius, which usually likes trying to reduce the number of files In touch per commit.
For example, my commit history would look like this:
Add new method to service class
Use new service class method in worker
And then as I continue working, all changes will be git commit--fixuped to one of those two commit’s hashes depending on where they occur.
And when it’s time to rebase in full, I can do a git rebase master --interactive--autosquash.
I try to structure my commits in a way that minimizes their blast radius, which usually likes trying to reduce the number of files In touch per commit.
For example, my commit history would look like this:
And then as I continue working, all changes will be
git commit --fixup
ed to one of those two commit’s hashes depending on where they occur.And when it’s time to rebase in full, I can do a
git rebase master --interactive --autosquash
.This is the way! Small commits with descriptive commit names, then just fixup into a few feature commits. Makes rebase a breeze.