3 ms·
> squash-merge the password-reset branch into the master branch (this makes it look like a single, clean commit, without the convoluted merge history and the ma
by dahart 10y ago
> squash-merge the password-reset branch into the master branch (this makes it look like a single, clean commit, without the convoluted merge history and the many intermediate commits on your branch)
Is this what most people do? And is this something you can turn off with Git Town? I don't like to to squash-merge, I spend time making sure my commits are as much logical and self-contained units as they can be in my branches, and I want to preserve the ability to revert and/or bisect them later.
- MBlume 10y agoIt's a trade-off. Many devs don't know how to do that, don't care to do that, will never learn to do that, and for them squash merge is a good option.
- dahart 10y agoFor sure. I'm not suggesting anyone else shouldn't; on the contrary just asking if Git Town goes both ways, and whether squash merge is more common in practice? I would have assumed that a regular (not squashed) merge is more common, and easier to do, because it's the default behavior of "git merge". It takes extra git commands and/or extra non-default arguments to git merge to get a squash merge. My GitHub also doesn't default to squash merge, IIRC... Don't you have to choose squash merge or be told to use it, if you don't otherwise know or care?
- gumby 10y agoI am the opposite, I like shush-merge although I understand and empathize with your view. My usage is to commit very frequently, like whenever I make a non-trivial fix or small refactor, or when something that touches several files compiles cleanly, or passes a unit test. This is several commits per day. It's practically every file save (if you remember filesystems with explicit version support). So my commit history is very noisy. When I push back to a shared repo, I want the commit history to document what the change is; various false or partial paths are not enlightening (if I planned to follow strategy 'X', found it did work, and backed out and used algorithm 'Y' then that should go in the source as a comment, not in the metadata. If my check ins were once a day I might not want to lose them. So I'm philosophically aligned with you, but my commits are so high frequency that the merge functions as a low-pass filter.
- saurik 10y agoI think the person you are responding to probably does something similar to what I do: make a bunch of changes and then use git add -p and possibly even rewriting history if required to come up with tons of clean and cohesive separable changes. I do not have "false or partial paths" as they end up in stashes or get elided from my local history before being pushed; but the high-level task I had, once finished and pushed to a shared repository, definitely contains tons of small change units that I want to keep.
- simplify 10y agoIf you squash merge into master, it's much easier to revert it later if something goes horribly wrong.