Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update git.md with more details about squash/amend commits #2617

Merged
merged 10 commits into from
Jul 26, 2024
21 changes: 21 additions & 0 deletions docs/contrib/git.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading