Upgrade to Pro — share decks privately, control downloads, hide ads and more …

How to write commit messsage

How to write commit messsage

Cf82bda9b67750da164786b916d6d050?s=128

Tatsushi Demachi

July 15, 2017
Tweet

Transcript

  1. )PXUP8SJUF $PNNJU.FTTBHF /4&(CZ!UBUTVTIJ@E

  2. 8IP w Ͱ·ͪͨͭ͠ !UBUTVTIJ@E  w Πϯϑϥ԰ʢαʔόɺωοτϫʔΫͳͲʣ w ӡ༻޲͚πʔϧΛॻ͘͜ͱ͕ଟ͍ w

    ࠷ۙ͸΋ͬͺΒ(P࢖͍
  3. )PXUP8SJUF $PNNJU.FTTBHF lJO&OHMJTIz

  4. ͖͔͚ͬ w (JUIVC #JU#VDLFUͳͲɺΦʔϓϯͳϦϙδτϦ ʹ৮ΕΔػձͷ૿Ճ w ௚͍ͨ͠όάɺ௥Ճ͍ͨ͠ػೳ͕͋Ε͹ɺؾܰʹ 1VMM3FRVFTUͰ͖Δ w ΨϯΨϯॻ͍ͯૹΖ͏ʂ

  5. ͕ʂ

  6. ӳޠͱ͍͏ߴ͍น

  7. w ίʔυॻ͘ΑΓӳޠͰίϛοτϝοηʔδॻ͘ ͷ͕ͭΒ͍໰୊ w ͦ΋ͦ΋ԿΛͲ͏ॻ͘ͷ͕͍͍ͷ͔ʁ w ͋Δఔ౓ͷϑΥʔϚοτ͕ཉ͍͠

  8. Α͍·ͱΊ͕͋ͬͨ

  9. w )PXUP8SJUFB(JU$PNNJU.FTTBHF
 IUUQTDISJTCFBNTJPQPTUTHJUDPNNJU w ࠓ೔͸ओʹ͜ͷ঺հͱɺ࢖ͬͯΈͨதͰͷײ૝ ͳͲΛަ͑ͯਐΊ͍͖ͯ·͢

  10. ݪଇ  4FQBSBUFTVCKFDUGSPNCPEZXJUIBCMBOLMJOF  -JNJUUIFTVCKFDUMJOFUPDIBSBDUFST  $BQJUBMJ[FUIFTVCKFDUMJOF  %POPUFOEUIFTVCKFDUMJOFXJUIBQFSJPE 

    6TFUIFJNQFSBUJWFNPPEJOUIFTVCKFDUMJOF  8SBQUIFCPEZBUDIBSBDUFST  6TFUIFCPEZUPFYQMBJOXIBUBOEXIZWTIPX
  11.  4FQBSBUFTVCKFDUGSPNCPEZXJUIBCMBOL MJOFʢλΠτϧͱຊจؒΛҰߦ͚͋Δʣ w ϦϙδτϦ؅ཧπʔϧɺαʔϏεͰ͸ɺ࠷ॳͷ ߦ͕λΠτϧͱͯ͠ѻΘΕΔ͜ͱ͕΄ͱΜͲ w ۭߦ͕ͳ͍ͱ੾Γ෼͚ΒΕͣɺҰจʹͳΔέʔε ͕͋Δ w

    ৄࡉઆ໌͕ෆཁͳΒɺλΠτϧ͚ͩͰे෼
  12.  -JNJUUIFTVCKFDUMJOFUPDIBSBDUFST
 ʢλΠτϧ͸จࣈҎ಺ʣ w ϦϙδτϦ؅ཧπʔϧɺαʔϏεͰ͸ɺ௕͍λΠ τϧ͸੾ΓऔΒΕΔɺ·ͨ͸ը໘֎ʹग़ͯ͠·͏ w ಡΈ΍͘͢ɺ୹͘อͭ w λΠτϧΛ୹͘Ͱ͖ͳ͍࣌͸ɺ͍Ζ͍ΖͳมߋΛ

    Ұ౓ʹೖΕΑ͏ͱ͍ͯ͠Δͷ͔΋ w ίϛοτ಺༰Λݟ௚͖͔͚ͬ͢ʹ΋
  13.  $BQJUBMJ[FUIFTVCKFDUMJOF
 ʢλΠτϧͷ࠷ॳͷจࣈ͸େจࣈʣ  %POPUFOEUIFTVCKFDUMJOFXJUIBQFSJPE
 ʢλΠτϧʹ͸຤ඌͷϐϦΦυ͸ෆཁʣ w ͍ΘΏΔӳޠهࣄͷݟग़͠ͷΑ͏ʹ w λΠτϧจࣈ਺ݫ͍͠ͷʹɺ຤ඌͷϐϦΦυͱ

    ͔͍Βͳ͍ΑͶ
  14.  6TFUIFJNQFSBUJWFNPPEJOUIFTVCKFDU MJOFʢλΠτϧ͸໋ྩܗͰʣ w ҰݟΘ͔Γʹ͍͘ϧʔϧ w ίϛοτ͸(JUͳͲͷπʔϧ΁ͷ໋ྩͱߟ͑Δ
 "EE9 'JY9 .FSHF9

    3FWFSU9FUD  w ͜ͷίϛοτ͕ద༻͞ΕͨΒɺͱ͍͏Լهͷӳ จʹ౰ͯ͸ΊΔͱߟ͑΍͍͢
 *GBQQMJFE UIJTDPNNJUXJMM\TVCKFDUMJOF^
  15. ྫ w *GBQQMJFE UIJTDPNNJUXJMMSFGBDUPSTVCTZTUFN9GPS SFBEBCJMJUZ w *GBQQMJFE UIJTDPNNJUXJMMVQEBUFHFUUJOHTUBSUFE EPDVNFOUBUJPO w

    *GBQQMJFE UIJTDPNNJUXJMMSFNPWFEFQSFDBUFENFUIPET w *GBQQMJFE UIJTDPNNJUXJMMSFMFBTFWFSTJPO w *GBQQMJFE UIJTDPNNJUXJMMNFSHFQVMMSFRVFTU GSPNVTFSCSBODI
  16. ͜ͷϧʔϧ΁ͷࡶײ w ͜ΕͰॻ͘ͱɺ͓ͷͣͱl"EEz l'JYz l3FNPWFz Έ͍ͨͳλΠτϧ͕૿͑Δ w ࣈʹऩΊΔ࣌ʹίʔυͷৼΔ෣͍Λॻ͘εϖʔ ε͕ແ͘ͳΓ͕ͪ w

    5IJTDPNNJUʜ͚ͩͰ͸ͳ͘5IJTDPEF SFQPTJUPSZʜͰߟ͑Δͷ΋͋ΓͰ͸ w *GBQQMJFE UIJTDPEFXJMM\TVCKFDUMJOF^
  17. ༨ஊ

  18. ೔ຊਓ͕ϋϚΔףࢺ B UIF ෳ਺ܗͷ໰୊

  19. λΠτϧॻ࣌͘͸
 ؾʹ͠ͳ͍ʂ

  20. ࣈ͸ͱʹ͔͘୹͍

  21.  8SBQUIFCPEZBUDIBSBDUFST
 ʢຊจ͸จࣈͰվߦʣ w ͍ΘΏΔݹ͖ྑ͖ϝʔϧͱಉ͡࡞๏ w ࢖͏ଆͷπʔϧʹΑΒͣɺಡΈ΍͍͢৔߹͕ଟ͍ w ࢍ൱྆࿦͕͘͢͝෼͔Εͦ͏ͳͱ͜Ζ w

    ҎલԼهͰ΋੝Γ্͕ͬͯͨ
 IUUQTHJUIVCDPNUPSWBMETMJOVYQVMM
  22.  6TFUIFCPEZUPFYQMBJOXIBUBOEXIZWTIPX
  ຊจʹ͸Ͳ͏मਖ਼͔ͨ͠Ͱ͸ͳ͘ɺԿΛͱͳͥΛ ॻ͘ʣ w मਖ਼ํ๏ɺ಺༰͸ɺίϛοτϩάͷίʔυͷม ߋ఺ΛΈΕ͹Θ͔Δ w मਖ਼ͷҙਤ΍ίʔυͷͲͷৼΔ·͍͕Ͳ͏໰୊

    ͩͬͨͷ͔ͳͲΛॻ͘ํ͕ɺޙʑίʔυཤྺΛ ࢀর͢Δ࣌ʹ༗༻
  23. ྫ Summarize changes in around 50 characters or less More

    detailed explanatory text, if necessary. Wrap it to about 72 characters or so. In some contexts, the first line is treated as the subject of the commit and the rest of the text as the body. The blank line separating the summary from the body is critical (unless you omit the body entirely); various tools like `log`, `shortlog` and `rebase` can get confused if you run the two together. Explain the problem that this commit is solving. Focus on why you are making this change as opposed to how (the code explains that). Are there side effects or other unintuitive consequences of this change? Here's the place to explain them. Further paragraphs come after blank lines. - Bullet points are okay, too - Typically a hyphen or asterisk is used for the bullet, preceded by a single space, with blank lines in between, but conventions vary here If you use an issue tracker, put references to them at the bottom, like this: Resolves: #123 See also: #456, #789
  24. ͜͜·Ͱͷ಺༰ΛΤσΟλɺ *%&ʹઃఆ͓ͯ͘͠ͱ޾ͤʹ

  25. )BQQZ)BDLJOH-JGF