From d80e53c5e6e3a1720d8de3339f96a03a3be974d1 Mon Sep 17 00:00:00 2001 From: arvindksi274-ksolves Date: Mon, 9 Mar 2026 15:26:09 +0530 Subject: [PATCH 1/9] Update doc page for how-to commit with more intro patch by Arvind Kandpal; for CASSANDRA-19777 --- .../ROOT/pages/development/how_to_commit.adoc | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) 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..94dd1c418c 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 @@ -8,6 +8,38 @@ The fix lands on the oldest release branch and is then forward-merges it into ea 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 + +To be an effective committer, you should be familiar with the following background details. While this is not a git tutorial, it outlines the expected workflow: + +* **Using CLI vs GitHub web UI:** We recommend using the Git CLI rather than the GitHub web UI. +* **Local feature branches:** Always do your work in a local feature/topic branch. Do not push your personal feature branches upstream; only the canonical trunk and release branches should be pushed to the shared repository when merging changes. +* **Workflow:** This repository uses a squash-rebase-merge workflow with feature branches. Fixes land on the oldest supported branch and are merged forward into newer branches (using ours merges and amended merge commits). +* **Basic git commands you should know:** +** `git remote add` & `git remote set-url` +** Squashing commits with `git rebase -i` +** Updating a commit with `git commit --amend` +** `git push origin --atomic -n` + +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 -feature/ trunk +git fetch https://github.com//.git :-feature/ +git checkout -feature/ +---- + +Step 2: Squash, fast-forward merge, and update on GitHub following the project workflow. +[source,shell] +---- +git rebase -i trunk # squash to a single, well-titled commit +git checkout trunk +git merge --ff-only -feature/ +git push origin trunk --atomic +---- + == Git branch based Contribution How to commit and merging git-based contributions. From ef614d2037332bbfaac1b0d9723bdb32e2034402 Mon Sep 17 00:00:00 2001 From: Arvind Kandpal Date: Tue, 10 Mar 2026 13:19:05 +0530 Subject: [PATCH 2/9] Update site-content/source/modules/ROOT/pages/development/how_to_commit.adoc Co-authored-by: mck --- .../source/modules/ROOT/pages/development/how_to_commit.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 94dd1c418c..1f3b004868 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,7 +4,7 @@ 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. +Fix land on the oldest 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. From d0a03d2efcd244e7b7969787679ea8b1fb8d2f13 Mon Sep 17 00:00:00 2001 From: Arvind Kandpal Date: Tue, 10 Mar 2026 13:21:43 +0530 Subject: [PATCH 3/9] Update site-content/source/modules/ROOT/pages/development/how_to_commit.adoc Co-authored-by: mck --- .../source/modules/ROOT/pages/development/how_to_commit.adoc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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 1f3b004868..df00b692e4 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 @@ -26,9 +26,7 @@ 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 -feature/ trunk -git fetch https://github.com//.git :-feature/ -git checkout -feature/ +git checkout -b / ---- Step 2: Squash, fast-forward merge, and update on GitHub following the project workflow. From b3cefce89dca2c766ebcbe1fb816fe6f72b69c68 Mon Sep 17 00:00:00 2001 From: Arvind Kandpal Date: Tue, 10 Mar 2026 13:29:16 +0530 Subject: [PATCH 4/9] Update site-content/source/modules/ROOT/pages/development/how_to_commit.adoc Co-authored-by: mck --- .../modules/ROOT/pages/development/how_to_commit.adoc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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 df00b692e4..75caa900a7 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 @@ -32,10 +32,12 @@ git checkout -b / Step 2: Squash, fast-forward merge, and update on GitHub following the project workflow. [source,shell] ---- -git rebase -i trunk # squash to a single, well-titled commit -git checkout trunk -git merge --ff-only -feature/ -git push origin trunk --atomic +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 From a709036cd4cf0b349902c418743b8348adda29a9 Mon Sep 17 00:00:00 2001 From: Arvind Kandpal Date: Tue, 10 Mar 2026 13:29:28 +0530 Subject: [PATCH 5/9] Update site-content/source/modules/ROOT/pages/development/how_to_commit.adoc Co-authored-by: mck --- .../source/modules/ROOT/pages/development/how_to_commit.adoc | 5 ----- 1 file changed, 5 deletions(-) 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 75caa900a7..370ac8e04d 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 @@ -15,11 +15,6 @@ To be an effective committer, you should be familiar with the following backgrou * **Using CLI vs GitHub web UI:** We recommend using the Git CLI rather than the GitHub web UI. * **Local feature branches:** Always do your work in a local feature/topic branch. Do not push your personal feature branches upstream; only the canonical trunk and release branches should be pushed to the shared repository when merging changes. * **Workflow:** This repository uses a squash-rebase-merge workflow with feature branches. Fixes land on the oldest supported branch and are merged forward into newer branches (using ours merges and amended merge commits). -* **Basic git commands you should know:** -** `git remote add` & `git remote set-url` -** Squashing commits with `git rebase -i` -** Updating a commit with `git commit --amend` -** `git push origin --atomic -n` Use the following Git CLI commands when merging a PR: From 4b3502a87cb936209b19e204d01dbc9ec9168687 Mon Sep 17 00:00:00 2001 From: Arvind Kandpal Date: Tue, 10 Mar 2026 13:30:51 +0530 Subject: [PATCH 6/9] Update site-content/source/modules/ROOT/pages/development/how_to_commit.adoc Co-authored-by: mck --- .../source/modules/ROOT/pages/development/how_to_commit.adoc | 1 - 1 file changed, 1 deletion(-) 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 370ac8e04d..ca62877609 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 @@ -14,7 +14,6 @@ To be an effective committer, you should be familiar with the following backgrou * **Using CLI vs GitHub web UI:** We recommend using the Git CLI rather than the GitHub web UI. * **Local feature branches:** Always do your work in a local feature/topic branch. Do not push your personal feature branches upstream; only the canonical trunk and release branches should be pushed to the shared repository when merging changes. -* **Workflow:** This repository uses a squash-rebase-merge workflow with feature branches. Fixes land on the oldest supported branch and are merged forward into newer branches (using ours merges and amended merge commits). Use the following Git CLI commands when merging a PR: From 3b8ce010e951126dc87752e1ff965ae503d1f8ec Mon Sep 17 00:00:00 2001 From: Arvind Kandpal Date: Tue, 10 Mar 2026 13:36:15 +0530 Subject: [PATCH 7/9] Update site-content/source/modules/ROOT/pages/development/how_to_commit.adoc Co-authored-by: mck --- .../source/modules/ROOT/pages/development/how_to_commit.adoc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 ca62877609..cf4d006ac8 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 @@ -10,9 +10,8 @@ This keeps a clean, traceable history and a single logical unit of work per tick == Introduction for New Committers -To be an effective committer, you should be familiar with the following background details. While this is not a git tutorial, it outlines the expected workflow: +To be an effective committer, you should be familiar with the following git command lines. The following outlines the simple trunk-only patch workflow. See next section for multi-branch contributions. -* **Using CLI vs GitHub web UI:** We recommend using the Git CLI rather than the GitHub web UI. * **Local feature branches:** Always do your work in a local feature/topic branch. Do not push your personal feature branches upstream; only the canonical trunk and release branches should be pushed to the shared repository when merging changes. Use the following Git CLI commands when merging a PR: From 4f49ec5bbea21f99517432e3c526717283343307 Mon Sep 17 00:00:00 2001 From: Arvind Kandpal Date: Tue, 10 Mar 2026 13:43:06 +0530 Subject: [PATCH 8/9] Update site-content/source/modules/ROOT/pages/development/how_to_commit.adoc Co-authored-by: mck --- .../source/modules/ROOT/pages/development/how_to_commit.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 cf4d006ac8..87384dce3d 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 @@ -10,9 +10,9 @@ This keeps a clean, traceable history and a single logical unit of work per tick == Introduction for New Committers -To be an effective committer, you should be familiar with the following git command lines. The following outlines the simple trunk-only patch workflow. See next section for multi-branch contributions. +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. -* **Local feature branches:** Always do your work in a local feature/topic branch. Do not push your personal feature branches upstream; only the canonical trunk and release branches should be pushed to the shared repository when merging changes. +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: From 7aa64d0422b3779240e70a1c10748cd55a5a8e98 Mon Sep 17 00:00:00 2001 From: Arvind Kandpal Date: Sat, 28 Mar 2026 15:34:35 +0530 Subject: [PATCH 9/9] Update site-content/source/modules/ROOT/pages/development/how_to_commit.adoc Co-authored-by: mck --- .../source/modules/ROOT/pages/development/how_to_commit.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 87384dce3d..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,7 +4,7 @@ Commits applicable to multiple versions are atomically pushed forward merges. -Fix land on the oldest 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. +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.