Re:Idiot Proof Git
by andrewvc on Wednesday November 09, 2022 @11:50AM
(#33534273)
I think you misunderstood my post, if you squash merge as I suggested your main branch is linear as with a rebase. Your PRs and the the working branches behind them should just use merged however. Come merge time the diff is turned into a single commit
[ Parent
| on HN ]
Re:Idiot Proof Git
by __blockcipher__ on Wednesday November 09, 2022 @02:13PM
(#33536446)
If you squash into a single commit upon merge, ignoring for the moment the fact that as a blanket rule that's a bad pattern, you've now eliminated one of the core arguments against rebasing. The merge commit adds no value if the branch itself is a single commit. Just rebase your squashed-into-one-commit branch ontop of latest master and push that to master instead. Now you have one commit representing your whole PR, with no pointless merge commit.
I really discourage the squashing upon merge approach entirely though, because that's just a bandaid for lazy and/or misinformed developers to cover up the fact that their whole git workflow is completely borked.
Re:Idiot Proof Git
by mixmastamyk on Wednesday November 09, 2022 @06:35PM
(#33539756)
Seems you still don't understand, merge commits are nothing special.
Just don't: https://news.ycombinator.com/item?id=33518496