Re:Ask HN: What is your Git commit/push flow?
by immutology on Thursday March 17, 2022 @02:16PM
(#30714246)
Squash-merge PRs. You can configure this in GitLab, GitHub, and Azure DevOps. Your private commits can be whatever you want and they get rolled up to a single PR commit when your working branch is merged to trunk.
[ Parent
| on HN ]
Re:Ask HN: What is your Git commit/push flow?
by beders on Thursday March 17, 2022 @02:23PM
(#30714314)
Yes.
Much easier to roll back things, cherry pick things and blame people ;)
Don't you dare merge a PR with 30 commits.
Re:Ask HN: What is your Git commit/push flow?
by conradludgate on Thursday March 17, 2022 @03:19PM
(#30714880)
+1 to this. I like the mantra that every commit is deployable
Re:Ask HN: What is your Git commit/push flow?
by seba_dos1 on Thursday March 17, 2022 @11:11PM
(#30718385)
"Every commit is deployable" isn't at odds with merging multi-commit MRs, provided that the submitter actually did their job well. I find squash-merging to be an ugly workaround, not a proper solution. Good non-trivial merge requests should usually consist of multiple commits that improve readability, revertability, cherry-pickability and blamability ;)