News for hackers. Stuff that matters.
Re:Fortunately, I don't squash my commits by m12k on Monday October 05, 2020 @08:11AM (#24686971)
What do you use your "cleaner history" for? I seldom go back and look at historical commits unless I'm debugging, in which case I'd prefer to know what actually happened at the time with as much information preserved as possible.
Re:Fortunately, I don't squash my commits by byte1918 on Monday October 05, 2020 @08:33AM (#24687120)
A clean history with proper commit names can work as a change log for you app. We actually did that and it worked quite well. In Azure DevOps the release pipelines have access to the list of commits since the previous release so one only has to simply take the titles of those commits to build it.
Re:Fortunately, I don't squash my commits by nikisweeting on Monday October 05, 2020 @12:01PM (#24688934)
You can achieve that with PR titles instead of commit titles.
Re:Fortunately, I don't squash my commits by spdionis on Monday October 05, 2020 @02:16PM (#24690398)
But then... PR titles don't show up in the git log.
Re:Fortunately, I don't squash my commits by Aeolun on Monday October 05, 2020 @10:05AM (#24687842)
I’d prefer that too, but preserving all commits often leads to things like: ‘Changed file 1’, ‘Changed file 2 and 3’ etc.

You’ll have a ton of noisy commits that together make up one full feature. In this case having all that noise squashed into one commit with a proper description is much nicer.

Re:Fortunately, I don't squash my commits by swalsh on Monday October 05, 2020 @08:21AM (#24687037)
Fore removing code that's buggy in production. It's way easier to find and remove 1 commit.
Re:Fortunately, I don't squash my commits by falcolas on Monday October 05, 2020 @08:45AM (#24687225)
Isn’t that what rolling back releases for? i.e. revert the container (or whatever your unit of release is) to the previous version? If you’re removing individual commits and re-releasing (rolling forward), you’re still at risk of being down, because you’re not going back to a known good release.
Re:Fortunately, I don't squash my commits by m12k on Monday October 05, 2020 @08:24AM (#24687062)
And what do you think about the linked article that shows how it's easier to find exactly which code is buggy if you have it in small commits instead of one big squashed one?
Re:Fortunately, I don't squash my commits by swalsh on Monday October 05, 2020 @08:30AM (#24687099)
Good, do what he did too... but in a feature branch.