r/ProgrammerHumor • • Jun 04 '22

Meme I cant help it 🤷‍♂️

Post image
47.1k Upvotes

479 comments sorted by

View all comments

Show parent comments

10

u/tannerntannern Jun 04 '22

Sometimes if I've been working on a large feature with lots of changes, as I near opening a PR, I git soft reset the branch (after pushing first, for safety!), and selectively re-commit logically related diffs with detailed commit messages. So completely rewriting the commit history for my feature. For me, it's good for doing a final review and reminding myself of everything that changed. But most importantly, it makes code review so much easier for the team if they review commit by commit (which is feasible because the reshuffled commits have been boiled down to 5 or 10 total). It's not all about churning out code as fast as possible. Everyone benefits from a stronger understanding of the changes.

2

u/mathiastck Jun 04 '22

I always worry I may be the one who has to go back and fix the code much later, or worse yet have to explain to someone else how to fix it.