fork-dev / Tracker

Bug and issue tracker for Fork for Mac
505 stars 12 forks source link

Feature request: squash commits *together* #1693

Open grigorye opened 2 years ago

grigorye commented 2 years ago

I do know that I can "squash commits into parent". But that sounds complicated to me, as typically I'm looking into replacing 2 or more commits with a single one. For example, if there are 2 commits and I want to turn those into one commit, currently I need to select exactly just most recent one and select "Squash into parent" - that sounds really counterintuitive/clunky to me. I would prefer if there was a "Squash" command (ideally backed by a keyboard shortcut), that would let me operate directly on the selected commits that I want to merge together (vs into parent), so that it would "compose" the corresponding rebase sequence for me.

DanPristupov commented 1 year ago

do know that I can "squash commits into parent". But that sounds complicated to me, as typically I'm looking into replacing 2 or more commits with a single one. ... "Squash into parent" - that sounds really counterintuitive/clunky to me

This is how git rebase works. We just wrap git feature into UI.

grigorye commented 1 year ago

do know that I can "squash commits into parent". But that sounds complicated to me, as typically I'm looking into replacing 2 or more commits with a single one. ... "Squash into parent" - that sounds really counterintuitive/clunky to me

Disclaimer: I'm not a Git expert (though, I've been using it for 7-8 years, including editing history - most of the time (except for specific kinds of automation) I do history editing in SmartGit - mostly squashing, reordering and splitting commits), so probably I miss something/I get used to doing it certain way.

Therefore, it's not a showstopper to me for using Fork, but I'd rather share my potentially biased opinion in attempt to make Fork better, from my current perspective.

This is how git rebase works. We just wrap git feature into UI.

Well, yes, that's true. But it's not natural for me as human being, when I just want to merge two commits, to select one of them, in assumption that the other one will be the parent, and that I need to rely on squashing. I mean, if I get it correctly, in terms of net result, it does not matter, which of the commits was parent and which was the child - and given that I see them both before squashing, I would prefer to select both. From that perspective, supporting that kind of invocation would help me think less about stuff that has little sense to me.

Don't get me wrong – I appreciate Fork's trying to stick to Git terminology/support all the Git features and etc. But I feel like here, in addition to the rigorous "wrap git feature" approach, Fork could provide a slightly higher level interface to the functionality – in the spirit of making it quick and no-brainer, like everywhere else in Fork. Btw, at quick glance, at least some other GUI clients provide that natural “squash” interpretation, where I make parent commit part of the selection (SmartGit, Git Tower)...