Git flow - crccheck/crccheck.github.io GitHub Wiki

This is about Git flow, not Git Flow

Good Git ideas

Use Conventional Commits

https://www.conventionalcommits.org Sometimes, it costs you a few extra characters, but it's a good system. Required for low effort decent quality changelogs and semver.

Squash merge your branches

You should almost always just do squash merges.

  1. Merge commits are superior to squash commits
  2. But merge commits take a lot of extra time to craft and rebase
  3. Squash commits are better for most people
  4. If your pull requests are sufficiently small, they end up behaving like merge commits

Arguments for merge:

It tells the full story. Counter: It only tells the full story if the committer crafts commits to tell the story. In practice, things get mixed up, merge commits from upstream come in, "oops" fixups create noise. You have to invest in education to get clean commits.

Easier to revert problems Counter: This only works if the committer is crafting atomic commits. And in practice, even if you do everything right, things will change or sneak in and make it so you can't revert.