3 ms·
> It does not matter that it's untidy. It's your history. That is only true if you are working in a personal git repo If you are committing against a repo wit
by room500 6y ago
> It does not matter that it's untidy. It's your history.
That is only true if you are working in a personal git repo
If you are committing against a repo with many others though, having a tidy git history is important. If I discover a bug and bisect to the "remove debug logging" commit, it is hard to revert that - or to even understand what it means. I then have to go in and try to determine which feature that debug logging is for and how many commits I need to revert to get back to a sane place.
My general rule of thumb is that I squash commits (when merging to a public repo) if the commit doesn't warrant time into creating a proper commit message (explaining what I am fixing, why, etc). I have no problem creating a set of 10 commits to merge in one feature, but each commit needs to be individually reviewable and understandable.