NVIDIA/nvbench

Use squash merging by default

Opened this issue · 0 comments

When using git log --graph, one can see that PRs tend to be merged. This produces a git history with unnecessary branching. It also produces commits on the main branch that may not necessarily work. If a PR like

  1. New commit with a bug
  2. Fix bug
  3. Address review comments

is not squash merged, the main branch will not be buildable at the intermediary commit (1.).

Squash merging by default would create one commit on main for each PR. If a contributor revises a PR multiple times, the intermediary commits will still be visible in the Git reviews for the PR, but main only tracks the end result. This creates a cleaner history on main.

With the "Default to pull request title and description" setting it is still possible to retain the initial PR commit message conveniently without having to manually copy-paste it 😄

Related github docs