News for hackers. Stuff that matters.
Re:Squash your commits by Pxtl on Friday April 01, 2016 @03:32PM (#11407829)
This is a presentation issue masquerading as a data issue. If somebody suggested deleting data because a report was ugly, they'd be laughed out of the room.

Give us tools to mark commits as unimportant or group them together as a meta-commit object for history purposes.

Re:Squash your commits by codingWithGit on Friday April 01, 2016 @04:04PM (#11408094)
This is good insight. makes a lot more sense. I think this will take care of 99% of use cases for sqqshing/rebasing.

However, I think this is something that will have to be built into git itself, not by Github.

Re:Squash your commits by tedmiston on Friday April 01, 2016 @07:37PM (#11409360)
> If somebody suggested deleting data because a report was ugly, they'd be laughed out of the room.

If somebody suggested keeping data that showed every step of a person writing a report, they'd be laughed out of the room.

It's gray area that varies significantly by feature complexity and team dynamic. I find it frustrating when someone merges a branch with 1 real commit and 3 more one-line commits or trivial fixes that should have been in the first.

Re:Squash your commits by greg0ire on Saturday April 02, 2016 @09:57AM (#11411524)
It's equally frustrating to have cs commits fixed up with a meaningful commit, making the diff of the meaningful commit ugly.
Re:Squash your commits by jgraham on Friday April 01, 2016 @05:43PM (#11408832)
So that's essentially what mercurial's evolve extension does. Which is pretty useful in some circumstances, e.g. if you have a review tool where you want to support rewriting history in a nice way (the typical approach to this in git tools is either a) don't meaningful support history rewriting, b) require manual ceremony for each history rewrite, or c) add unique ids to each immutable-across-rewrites commit).

Whilst it's clear that retaining the pushed history can be useful in some cases, I don't understand the notion that disallowing history rewrites helps retain useful data in general. Developers can make commits for all kinds of arbitary reasons e.g. they reached the end of the day, or had to switch branches to work on a different patch. That doesn't seem like a particularly useful thing to record. To take it to an extreme, I wonder if any of the people who think that the precise commit history gives useful information about how a feature was developed have configured their editor to commit on keystroke, since that seems like the logical conclusion of that position (and indeed is effectively what tools like etherpad do). I suspect not because, actually, being selective about the information that you keep is rather helpful. During rebase we see the developer as curator, selecting the most useful representation of a set of changes for the benefit of future readers. or, to use your analogy, if someone suggested removing meaningless data from a report to focus attention on the most important points, then they would certainly not be laughed at, but praised.

Of course GitHub's implementation is too blunt a tool to be really useful, but hopefully we will eventually get something better.