From 2ee4c584bc3810f289f16da8a3ccb3221d939acd Mon Sep 17 00:00:00 2001 From: Michael Vorburger Date: Fri, 26 Jul 2024 13:41:53 +0200 Subject: [PATCH] Update git.md with more details about squash/amend commits (#2617) Co-authored-by: Bashir Sadjad Co-authored-by: Jing Tang --- docs/contrib/git.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/contrib/git.md b/docs/contrib/git.md index 729fa78fb3..cabd02a501 100644 --- a/docs/contrib/git.md +++ b/docs/contrib/git.md @@ -4,6 +4,27 @@ This page documents [Git](https://git-scm.com) tips for contributors to this pro This project generally follows [these guidelines](https://github.com/google/fhir-data-pipes/blob/master/doc/review_process.md) from our `fhir-data-pipes` sister project. +## Overview + +We use the following workflow: + +1. Contributors can open "draft" PRs for any Work In Progress (WIP) which does not require review yet. + It's OK if the checks do not pass yet. + +1. When a PR is ready for code review, the contributor marks the PR as "Ready for review". For a smooth review, the PR must pass all the checks. + At this point, the PR should only have 1 single commit; please "squash" (or use `--amend`) your "local history", + before pushing to a branch to open a PR (or when your WIP Draft PR is ready for review). The commit message + of this initial commit should explain what this PR is all about. + +1. Maintainers, or other Contributors, will now review the PR. They may add comments requesting changes. + +1. When contributors update PRs to make changes requested by reviewers, those should be added as + additional new single commits per round of review, + typically with a generic message such as _"Incorporated review feedback."_ + Do NOT squash (or amend) these review updates into the original commit. + +1. Maintainers (with write acces) _squash_ all commits of PRs into a single commit when merging. + ## Usage ### Edit on GitHub Web UI