Skip to content

CASSANDRA-19777: Update doc page for how-to commit with more intro#311

Open
arvindKandpal-ksolves wants to merge 9 commits intoapache:trunkfrom
arvindKandpal-ksolves:CASSANDRA-19777
Open

CASSANDRA-19777: Update doc page for how-to commit with more intro#311
arvindKandpal-ksolves wants to merge 9 commits intoapache:trunkfrom
arvindKandpal-ksolves:CASSANDRA-19777

Conversation

@arvindKandpal-ksolves
Copy link
Copy Markdown
Contributor

Why is this PR being submitted?

This PR resolves CASSANDRA-19777.

New committers often need a quick overview of the expected Git workflow before diving into the specific patch/branch-based contribution steps. This PR adds a brief introduction to the how_to_commit documentation to outline these prerequisites, as requested in the Jira ticket, without turning the page into a full Git tutorial.

What changes were made?

Added a new == Introduction for New Committers section to how_to_commit.adoc which covers:

  • The preference for using the Git CLI over the GitHub Web UI.
  • The requirement to use local feature branches and never push a branch directly upstream.
  • The squash-rebase-merge workflow.
  • Essential git commands (remote add, rebase -i, commit --amend, push --atomic -n).
  • The GitHub CLI commands for locally testing and merging a PR.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates Cassandra’s committer documentation (how_to_commit.adoc) to add a short “Introduction for New Committers” section that summarizes expected Git workflow prerequisites before the existing branch/patch-based contribution instructions.

Changes:

  • Adds an introductory section describing preferred tooling (CLI), use of local feature branches, and a high-level workflow summary.
  • Adds a short list of “basic git commands” and an example sequence intended to show how to locally test and merge a PR.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

patch by Arvind Kandpal; for CASSANDRA-19777
@arvindKandpal-ksolves
Copy link
Copy Markdown
Contributor Author

Hi @bschoening , I have applied Copilot suggestions , Please take a look.

Copy link
Copy Markdown
Member

@michaelsembwever michaelsembwever left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one more nit suggestion, otherwise good to go


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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but why?


== 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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest:

GitHub Pull Requests are merged using Git command-line tools instead of the GitHub UI. The following workflow outlines a standard trunk-only patching process; for contributions involving multiple branches, see the next section.


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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Development occurs within personal forks, as the upstream apache/cassandra repository is strictly reserved for the trunk and official release branches.

# there should only be one commit, squashed
git cherry-pick <jira>/<branch>
git push --atomic origin trunk -n
# check dry-run looks correct
Copy link
Copy Markdown
Contributor

@bschoening bschoening Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't the dry run comment (-n) be before the command not after? I realize it's suggesting to check afterwards, but might be be more clear if the dry run was explained before executed.

# push as dry-run (-n) and check that it looks correct

----
git switch trunk
# there should only be one commit, squashed
git cherry-pick <jira>/<branch>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cherry pick a branch or commit-hash?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants