AGENTS.md: document amend!, fixup-only PRs, and direct GfW PRs#6232
Draft
dscho wants to merge 1 commit intogit-for-windows:mainfrom
Draft
AGENTS.md: document amend!, fixup-only PRs, and direct GfW PRs#6232dscho wants to merge 1 commit intogit-for-windows:mainfrom
amend!, fixup-only PRs, and direct GfW PRs#6232dscho wants to merge 1 commit intogit-for-windows:mainfrom
Conversation
The existing `Fixup Commits` section explained the `fixup!` flavour but said nothing about `amend!`, which has different semantics (replaces the target's commit message and combines diffs to produce any desired final state). The `amend!` form is also the canonical way to align a downstream branch-thicket commit with an in-flight upstream replacement, so its absence from the guide left a hole that contributors fill by reading the merging-rebase machinery from source. Add a dedicated subsection covering `amend!`, plus a separate subsection on the pattern of constructing PRs that consist *only* of `fixup!` and `amend!` commits targeting existing thicket commits. That pattern is the natural shape for a PR that adjusts or removes a multi-commit downstream feature: each pair autosquashes during the next merging-rebase, exact-cancel pairs drop as empty, and the end state is as if the originals had been edited or removed in place. Also add a top-level `Contributing to Git for Windows` section to parallel the existing `Contributing to Upstream Git via GitGitGadget` section, with the cross-fork `gh pr create` invocation, a pointer to when the fixup-and-amend-only shape is appropriate, and a pointer to when the upstream-aligning `amend!` pattern is appropriate. Until now the guide covered upstream contributions in detail but said nothing about the primary contribution path for this fork. Assisted-by: Claude Opus 4.7 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This closes two gaps in the current
AGENTS.mdthat came up while drafting #6231 and #2104:The
Fixup Commitssection only coveredfixup!.amend!has different semantics (replaces the target's commit message and combines diffs to produce any final state), and the "amend! whose body is the upstream commit and whose diff aligns the squashed result with that upstream commit" pattern is precisely how the first commit of Drop mimalloc #6231 anticipates the in-flight nedmalloc removal inseenase576abb9f8. That pattern is undocumented today.There is no top-level "Contributing to Git for Windows" section, only "Contributing to Upstream Git via GitGitGadget". The cross-fork
gh pr createinvocation, the conditions under which a PR is naturally a fixup/amend-only series against existing thicket commits, and the upstream-aligningamend!shape were all things I inferred from context rather than the guide.Add subsections that cover those gaps. Nothing in the existing text changes.