710
Go ahead and commit this change, as well.
711
712
[[ready-to-share]]
713
-== Getting Ready to Share
713
+== Getting Ready to Share: Anatomy of a Patch Series
714
715
You may have noticed already that the Git project performs its code reviews via
716
emailed patches, which are then applied by the maintainer when they are ready
717
-and approved by the community. The Git project does not accept patches from
717
+and approved by the community. The Git project does not accept contributions from
718
pull requests, and the patches emailed for review need to be formatted a
719
-specific way. At this point the tutorial diverges, in order to demonstrate two
719
+specific way.
720
+
721
+:patch-series: https://lore.kernel.org/git/pull.1218.git.git.1645209647.gitgitgadget@gmail.com/
722
+:lore: https://lore.kernel.org/git/
723
+
724
+Before taking a look at how to convert your commits into emailed patches,
725
+let's analyze what the end result, a "patch series", looks like. Here is an
726
+{patch-series}[example] of the summary view for a patch series on the web interface of
727
+the {lore}[Git mailing list archive]:
728
+
729
+----
730
+2022-02-18 18:40 [PATCH 0/3] libify reflog John Cai via GitGitGadget
731
+2022-02-18 18:40 ` [PATCH 1/3] reflog: libify delete reflog function and helpers John Cai via GitGitGadget
732
+2022-02-18 19:10 ` Ævar Arnfjörð Bjarmason [this message]
733
+2022-02-18 19:39 ` Taylor Blau
734
+2022-02-18 19:48 ` Ævar Arnfjörð Bjarmason
735
+2022-02-18 19:35 ` Taylor Blau
736
+2022-02-21 1:43 ` John Cai
737
+2022-02-21 1:50 ` Taylor Blau
738
+2022-02-23 19:50 ` John Cai
739
+2022-02-18 20:00 ` // other replies ellided
740
+2022-02-18 18:40 ` [PATCH 2/3] reflog: call reflog_delete from reflog.c John Cai via GitGitGadget
741
+2022-02-18 19:15 ` Ævar Arnfjörð Bjarmason
742
+2022-02-18 20:26 ` Junio C Hamano
743
+2022-02-18 18:40 ` [PATCH 3/3] stash: call reflog_delete from reflog.c John Cai via GitGitGadget
744
+2022-02-18 19:20 ` Ævar Arnfjörð Bjarmason
745
+2022-02-19 0:21 ` Taylor Blau
746
+2022-02-22 2:36 ` John Cai
747
+2022-02-22 10:51 ` Ævar Arnfjörð Bjarmason
748
+2022-02-18 19:29 ` [PATCH 0/3] libify reflog Ævar Arnfjörð Bjarmason
749
+2022-02-22 18:30 ` [PATCH v2 0/3] libify reflog John Cai via GitGitGadget
750
+2022-02-22 18:30 ` [PATCH v2 1/3] stash: add test to ensure reflog --rewrite --updatref behavior John Cai via GitGitGadget
751
+2022-02-23 8:54 ` Ævar Arnfjörð Bjarmason
752
+2022-02-23 21:27 ` Junio C Hamano
753
+// continued
754
+----
755
+
756
+We can note a few things:
757
+
758
+- Each commit is sent as a separate email, with the commit message title as
759
+ subject, prefixed with "[PATCH _i_/_n_]" for the _i_-th commit of an
760
+ _n_-commit series.
761
+- Each patch is sent as a reply to an introductory email called the _cover
762
+ letter_ of the series, prefixed "[PATCH 0/_n_]".
763
+- Subsequent iterations of the patch series are labelled "[PATCH v2]", "[PATCH
764
+ v3]", etc. and sent with a new cover letter, itself a reply to the cover
765
+ letter of the previous iteration (more on that below).
766
+
767
+At this point the tutorial diverges, in order to demonstrate two
768
different methods of formatting your patchset and getting it reviewed.
769
770
The first method to be covered is GitGitGadget, which is useful for those