4 ms·
> Clean project history is overrated. I go back and forth on this issue. On one hand, I like having commits that do one thing. Makes it easier to "read" a pro
by sdegutis 10y ago
> Clean project history is overrated.
I go back and forth on this issue.
On one hand, I like having commits that do one thing. Makes it easier to "read" a project's history, to revert things, to track down bug introductions.
On the other hand, I like having a history of the mess of how I actually implemented something, because it's more accurate and more detailed, both of which help when I go all DETECTIVE-MODE: ACTIVATE.
But on the other hand, the mess often includes such uselessly awful commit messages, and lots of terrible code that only existed for like 2 hours until I realized it was the wrong way to do it, and scrapped it. That's kind of a red earring.
So I don't really have a firm opinion on it anymore. I just go with whatever I feel that day. That said, I'm a team of 1 and have been for about 4 years, so it doesn't matter too much in my case.
- gouggoug 10y ago> On the other hand, I like having a history of the mess of how I actually implemented something, because it's more accurate and more detailed, both of which help when I go all DETECTIVE-MODE: ACTIVATE. The "mess of how things were implemented" has 0 value for your fellow coworkers when it comes to understanding the code and tracking down bugs. Each and every commit should as much as possible be "atomic" with a clear message describing what was done (not the how) and why. It is in the commit message that the developper should go on explaining their implementation decisions. What I picture is a feature branch with multiple small commits leading to the full implementation of the feature. When comes the time to rebase and merge in master, the merge commit could include a detailed explanation of the implementation choices that were made.
- AlexCoventry 10y ago> I'm a team of 1 and have been for about 4 years What kind of work do you do?
- sdegutis 10y agoI work full time on a pretty standard low traffic online store web app written entirely in Clojure.
- AlexCoventry 10y agoAh! I remember you from #clojure. Been reading some Uncle Bob recently, turned on to him partly because I remember you speaking about him.
- StavrosK 10y agoWhy not rebase master into your branch, rebase your branch locally to clean it up, then merge it back into master? That way you get the best of both worlds.