diff --git a/site-content/source/modules/ROOT/pages/development/how_to_commit.adoc b/site-content/source/modules/ROOT/pages/development/how_to_commit.adoc index a3dccb8ad7..efa13ac486 100644 --- a/site-content/source/modules/ROOT/pages/development/how_to_commit.adoc +++ b/site-content/source/modules/ROOT/pages/development/how_to_commit.adoc @@ -4,10 +4,35 @@ Commits applicable to multiple versions are atomically pushed forward merges. -The fix lands on the oldest release branch and is then forward-merges it into each newer branch using an ours merge to record branch lineage and amends that merge commit to include the branch-appropriate patch. +Fixes are applied first on the oldest applicable release branch, and are then forward-merged onto each newer branch using an ours merge strategy to record branch lineage. Each forward-merge commit contains the branch-appropriate patch. This keeps a clean, traceable history and a single logical unit of work per ticket per branch, while preventing unintended diffs from being pulled forward automatically. +== Introduction for New Committers + +Patches are applied using git command lines, not via github UI. The following outlines the simple trunk-only patch workflow. See next section for multi-branch contributions. + +Development branches are kept in forks. The upstream apache/cassandra repository is reserved for trunk and release branches. + +Use the following Git CLI commands when merging a PR: + +Step 1: From your project repository, check out a new branch and test the changes. +[source,shell] +---- +git checkout -b / +---- + +Step 2: Squash, fast-forward merge, and update on GitHub following the project workflow. +[source,shell] +---- +git switch trunk +# there should only be one commit, squashed +git cherry-pick / +git push --atomic origin trunk -n +# check dry-run looks correct +git push --atomic origin trunk +---- + == Git branch based Contribution How to commit and merging git-based contributions.