Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

# good - ensures that a merge commit is created

$ git merge --no-ff my-branch

# bad

$ git merge my-branch

Keep Commit History during the PR Review

(per Monthly Architect's Meeting of 3/15/21)

When committing during the process of PR reviews, try to keep the commit history to make it easier for reviewers to see and follow the prior feedback conversations.  This means that, in general (subject to discusssions between committers and reviewers), don't squash the commit history until the PR is approved.  Also, don't force push the updates during the review/feedback process.  Instead, when making commits during the review process, follow the following commit process:

  • Make commits with your new commit comments:  git commit -s -m "your review comment with appropriate semantic version type/scope tags"
  • Commit without a force:  git push origin yourbranch (vs git push -f origin yourbranch)
  • On the last commit when the review has been completed , do a force push in order to rebase(or whenever the PR needs to be rebased during the review cycle), a force push is ok if the PR  is only being rebasedgit push -f origin yourbranch

...