6 replies

Replying to @coderbyheart

It makes reviewing a PR easier if all the commits in a PR are condensed down to
a set of distinct commit messages, even if they get squashed when being merged
anyway. See this as an opportunity to describe to the reviewer what you did when
implementing the change.

Replying to @coderbyheart

Creating a clean set of distinct commits in a PR requires that atomic commits
were made in the first place. It's a good habit while developing to commit early
and commit often: create many small commits, which you then later can combine
into bigger ones.

Replying to @coderbyheart

git add -p allows you to create multiple commits from a situation where you
have applied different changes while developing (a new feature here, but also a
bug fix, and maybe some formatting, or changes to the CI configuration).