Commit message will never die

Commit message will never die

Rails Developers Meetup 2018: day 1
(https://techplay.jp/event/639872)

023b04c98f39cc041293d780352432ff?s=128

Koichi ITO

March 24, 2018
Tweet

Transcript

  1. $PNNJUNFTTBHFXJMMOFWFSEJF  4BU 3BJMTίϯτϦϏϡʔγϣϯ ͔ΒֶΜͩ (JU(JU)VCज़ ҏ౻ߒҰ !LPJD FTN 3BJMT%FWFMPQFST.FFUVQEBZ

    άϥϯτ΢Ωϣ΢α΢ελϫʔ֊
  2. None
  3. None
  4. None
  5. None
  6. None
  7. ࠓ೔ͷ࿩

  8. IUUQTUXJUUFSDPNLPJDTUBUVT

  9. SBJMTSBJMT 3FNPWFA"4.VMUJCZUFATVOJDPEFUBCMF

  10. None
  11. $POUFYU Կނඞཁ͔

  12. $POUFYU Կނඞཁ͔ .FSJU ͲΜͳಘ͕

  13. )PX ࣮૷ϙΠϯτ

  14. )PX ࣮૷ϙΠϯτ ࣮ࡍ͸· ͩଓ͘

  15. .FTVSF ܭଌ

  16. .FTVSF ܭଌ Ϛʔδͯ͠΋Β͏ͨΊʹඞཁͳ৘ใΛ ඞཁͳ͚ͩ٧Ί͍ͯΔ

  17. ŠŠŠŠŠŠŠ౰ͨΓલΛ౰ͨΓલʹ Step up your natural commit skill

  18. ,BUB

  19. w5IFTFWFOSVMFTBHBJO w.Z3PDL)FSPFTJO +BQBO w(JU(JU)VCXPSLqPX "HFOEB

  20. w5IFTFWFOSVMFTBHBJO w.Z3PDL)FSPFTJO +BQBO w(JU(JU)VCXPSLqPX "HFOEB

  21. IUUQTDISJTCFBNTJPQPTUTHJUDPNNJU

  22.  4FQBSBUFTVCKFDUGSPNCPEZXJUIBCMBOLMJOF  -JNJUUIFTVCKFDUMJOFUPDIBSBDUFST  $BQJUBMJ[FUIFTVCKFDUMJOF  %POPUFOEUIFTVCKFDUMJOFXJUIBQFSJPE  6TFUIFJNQFSBUJWFNPPEJOUIFTVCKFDUMJOF

     8SBQUIFCPEZBUDIBSBDUFST  6TFUIFCPEZUPFYQMBJOXIBUBOEXIZWTIPX 5IFTFWFOSVMFTPGBHSFBU(JU DPNNJUNFTTBHF
  23. IUUQTQPTUEDDIPXUPXSJUFBHJUDPNNJUNFTTBHF

  24. None
  25. ৺ʹཹΊ͓͍͍ͯͯͩ͘͞ ͜Ε͸ࠓ·Ͱ΋ ݴΘΕ͖ͯͨ ͣͬͱ ͜ͱͰ͢ɻ

  26. कഁ཭

  27. कഁ཭

  28. .JYJO+BQBOFTF

  29. 

  30. w ߦۭ͚ͯॻ͖·͠ΐ͏ w HJUͷίϛοτϝοηʔδ͸ߦ໨͕ λΠτϧɺߦ໨Ҏ͕߱ຊจ w ߦ໨ΛۭʹͤͣຊจΛॻ͘ͱશͯλ Πτϧѻ͍ʹͳΓɺgit --oneline ΍tig

    ίϚϯυͰҰॹͨ͘ʹͳΔ λΠτϧͷޙ͸ߦۭ͚ͯຊจΛॻ͘
  31. λΠτϧͷޙ͸ߦۭ͚ͯຊจΛॻ͘ λΠτϧ ߦ໨ ຊจ ߦ໨Ҏ߱ ۭߦ ߦ໨

  32. 

  33. w ࣈ͸໨҆Ͱଟগӽ͑ͯ΋ྑ͍ w ཁ໿ʹͰ͖ͳ͍΄Ͳ௕͘ͳΔΑ͏Ͱ͋ Ε͹ͦΕ͸ຊจʹॻ͘͜ͱ w ίϛοτϝοηʔδ͸ʮԿނʯΛॻ͘ ΋ͷ͕ͩλΠτϧ͸ʮԿΛʯͰྑ͍ λΠτϧΛࣈҎ಺ʹ͓͞ΊΔ

  34. 

  35. w จষͷ࢝Ί͕େจࣈ͸ӳจ๏ͷجຊ w lӳจ๏จষઌ಄େจࣈz<ݕࡧ> w ೔ຊޠͳΒؾʹ͠ͳ͍ ؔ܎ͳ͍ λΠτϧͷจ಄Λେจࣈʹ͢Δ

  36. 

  37. w λΠτϧྖҬΛݮΒͤΔ w ೔ຊޠͰ΋۟఺͸ෆཁ w ۟఺͕ݱΕΔͱಡ఺΋ݱΕ࢝ΊͨΓཁ ໿͔Β௕Ίͷઆ໌΁ͱ཭Ε͍ͯ͘ w ΧϯϚɺಡ఺໨ඪͰ࠷େճΛ໨҆ ʹ͍ͯ͠Δ

    λΠτϧͷจ຤ʹϐϦΦυΛ෇͚ͳ͍
  38. 

  39. w /" w ೔ຊޠͷ৔߹͸ମݴࢭΊ͔༻ݴࢭΊ͔ ΛͳΔ΂͘౷Ұ͍ͯ͠Δ w ݸਓతʹ͸༻ݴࢭΊΛ࢖͍ͬͯΔ w ந৅ྫʓʓΛ˚˚͢Δ λΠτϧ͸໋ྩ๏Ͱهड़͢Δ

  40. 

  41. w ࣈ͸໨҆Ͱଟগӽ͑ͯ΋ྑ͍ w 13ͷຊจʹॻ͘಺༰Λه͓ͯ͘͠ͱ ྑ͍ ޙड़͢Δ(JU)VCͱͷ࿈ಈྫ ຊจ͸ߦ͋ͨΓࣈҎ಺ʹ͓͞ΊΔ

  42. 

  43. w ʮͲͷΑ͏ʹ )PX ʯ͸࣮૷ΛಡΊ ͹Θ͔Δ w ʮԿΛ 8IBU ʯ͸ίϛοτϝοηʔ δߦ໨ʹλΠτϧͱͯ͠ه͢

    w ʮͳͥ 8IZ ʯ͸ίϛοτϝοηʔ δߦ໨ͷຊจͱͯ͠ه͢ ຊจͰ͸ʮͲͷΑ͏ʹʯͰ͸ͳ͘ʮԿ ΛʯͱʮͳͥʯΛઆ໌͢Δ
  44. 8IBU ԿΛ͢Δ͔

  45. $POUFYU Կނඞཁ͔ 8IBU ԿΛ͢Δ͔

  46. $POUFYU Կނඞཁ͔ .FSJU ͲΜͳಘ͕ 8IBU ԿΛ͢Δ͔

  47. $POUFYU Կނඞཁ͔ .FSJU ͲΜͳಘ͕ 8IBU ԿΛ͢Δ͔ 8IBU

  48. $POUFYU Կނඞཁ͔ .FSJU ͲΜͳಘ͕ 8IBU ԿΛ͢Δ͔ 8IZ 8IBU

  49. 5IFTFBSF (VJEFMJOFT IUUQKBXJLJQFEJBPSHXJLJ&""&""&##&&##"NFEJB'JMF$BOUJOP1MBOJTQIFSFQOH

  50. w5IFTFWFOSVMFTBHBJO w.Z3PDL)FSPFTJO +BQBO w(JU(JU)VCXPSLqPX "HFOEB

  51. )FSPFT !LBNJQP !ZZBHJ !BNBUTVEB BOENPSF !ZBIPOEB !QPDLF

  52. w ڧͦ͏ͳਓͨͪɻڧͦ͏ͳਓͨͪΛਅ ࣅΕ͹ڧ͘ͳΕͦ͏ w ڧ͍ਓୡ͸ίϛοτϝοηʔδ΋ڧ͍ w ίʔυ͚ͩͰͳ͘ίϛοτϝοηʔδ ΋ެ։͞Εͯͯഎத͔Β,BUBΛֶͿ ͜ͱ͕Ͱ͖Δ )FSPJTTUSPOH

  53. ,BUB 28"/ JO 2VBMJUZ8JUIPVU"/BNF

  54. w l/PEFTDSJQUJPOQSPWJEFE͸ ಛʹॳର໘ʹରͯ͠ ࣦྱz w lͳͥͦͷ13ΛϚʔδ͢Δඞཁ͕͋ Δͷ͔Λॻ͘z w l༗ӹͳ৘ใ͸͢΂ͯه͢z w

    l$PTNFUJDDIBOHFͰ͸͋͑ͯ͋ ·Γॻ͔ͳ͍ ࣭ྔͷରൺ z )FSPFT໊ݴू ࢲͷίϯύε
  55.  lOPEFTDSJQUJPO QSPWJEFEzΛ߇͑Δ (JU(JU)VC5JQT

  56. #FGPSF IUUQTHJUIVCDPNNVSZPJNQMCVPZTQVMM

  57. "GUFS IUUQTHJUIVCDPNCCBUTPWSVCPDPQQVMM

  58. w5IFTFWFOSVMFTBHBJO w.Z3PDL)FSPFTJO +BQBO w(JU(JU)VCUJQT "HFOEB

  59. My workflow before and after

  60. w NBTUFSʹ͍Δ··࡞ۀ w ࡞ۀ໨ॲ͕͍ͭͨΒϒϥϯνΛ੾Δ w HJUDPNNJU࣌ʹ͸λΠτϧ͚ͩΛ ॻ͍ͯίϛοτ w 13ͰຊจΛॻ͘ ʙ೥͘Β͍લͷ࡞ۀϑϩʔ

  61. w ࡞ۀͷཁ໿Λϒϥϯν໊ʹͯ͠ϒϥϯ νΞ΢τ w λΠτϧͱຊจΛίϛοτ w 13͸੔ܗͷΈ ݱࡏͷ࡞ۀϑϩʔ

  62. w ࡞ۀͷཁ໿Λϒϥϯν໊ʹͯ͠ϒϥϯ νΞ΢τ w λΠτϧͱຊจΛίϛοτ w 13͸੔ܗͷΈ ݱࡏͷ࡞ۀϑϩʔ 5JQT঺հ

  63.  lOPEFTDSJQUJPOQSPWJEFEzΛ߇͑Δ  ࡞ۀ໨తʹ͍ͭͯϒϥϯν໊Λ෇͚Δ  ϒϥϯνΛߜΓࠐΊΔΑ͏ʹ͢Δ  .BSLEPXOΛ࢖ͬͯίϛοτϝοηʔδΛॻ͘  λΠτϧͱҰॹʹຊจΛॻ͘

     $MPTJOHLFZXPSETΛ׆༻͢Δ  ؔ࿈͢Δίϛοτ͸TRVBTI͢Δ (JU(JU)VCUJQT ࡁ
  64.  ࡞ۀ໨తʹ͍ͭͯ ϒϥϯν໊Λ෇͚Δ (JU(JU)VC5JQT

  65. w ࡞ۀ ్த ͷ͜ͱʹ͍֮ͭͯॻʹͳΔ w (JU)VCͰͷλΠτϧΛΠϝʔδ͢Δ w Ϛʔδ͞ΕΔࡍʹl.FSHFQVMM SFRVFTUGSPNVTFS CSBODIOBNFzͱ͍ͬͨײ͡Ͱλ

    ΠτϧʹೖΔͷͰͳΔ΂͘୹ͯ͘͠Δ ࡞ۀ໨తʹ͍ͭͯϒϥϯν໊Λ͚ͭΔ
  66. λΠτϧͱϒϥϯν໊ͷ૬ҧ FH ϒϥϯν໊

  67. λΠτϧͱϒϥϯν໊ͷ૬ҧ FH ϒϥϯν໊

  68. λΠτϧͱϒϥϯν໊ͷ૬ҧ FH ϒϥϯν໊

  69. λΠτϧͱϒϥϯν໊ͷ૬ҧ FH ϒϥϯν໊

  70. None
  71.  ϒϥϯνΛߜΓࠐΊΔΑ͏ ʹ͢Δ (JU(JU)VC5JQT

  72. ϒϥϯν໊ͰߜΓࠐΉ alias cb=‘ git checkout ` git branch | peco

    | sed -e "s/\* //g" | awk "{print \$1}"`' IUUQTHJUIVCDPNLPJDEPUpMFTCMPCFECECGBCGCEPUTIHJUTI- ߜΓࠐΈ༻ ΤΠϦΞε
  73. ϒϥϯν໊ͰߜΓࠐΉ IUUQTHJUIVCDPNLPJDEPUpMFTCMPCFECECGBCGCEPUTIHJUTI- QFDPͰߜΓࠐΈ

  74. w LPJDΦϦδφϧ w ࡞Γ͔͚ͷϩʔΧϧͷ΋ͷɺੜࣽ͑Ͱ ެ։ʹ͸ૣ͗͢Δ w ෳ਺ͷ࡞ۀதϒϥϯνΛ࣋ͭϦϙδτ ϦͰͷϒϥϯνߜΓࠐΈͷϔϧύʔ w ෆඞཁʹόοΫϦϯΫΛ͚ͭͨ͘ͳ͍

    ࡞ۀதϒϥϯνͷ઀಄ࢠʹXJQ@Λ෇͚Δ
  75. XJQ@Ͱ࢝·Δϒϥϯν͸QVTIͰ͖ͳ͍ #!/bin/sh # if [ "$(git rev-parse --abbrev-ref HEAD |

    grep '^wip_')" ]; then echo "\033[0;31m[ABORT] You cannot push a branch whose prefix is \`wip_\`. \033[0;39m" 1>&2 exit 1 fi exit 0 IUUQTHJUIVCDPNLPJDEPUpMFTDPNNJUGCBCEEDEFGCCEFEGB HJUIPPLT QSFQVTI
  76. %&.0

  77.  .BSLEPXOΛ࢖ͬͯ ίϛοτϝοηʔδΛॻ͘ (JU(JU)VC5JQT

  78. IUUQLPJDIBUFOBCMPHDPNFOUSZHJUDPOpHHMPCBMDPSFDPNNFOUDIBS

  79. w HJUͷσϑΥϧτͩͱɺίϛοτϝοηʔ δΛฤू͢ΔΤσΟλͰͷίϝϯτߦ͕ ʹͳ͍ͬͯΔ w ҰํͰ(JU)VCͷ1VMM3FRVFTUͰ จॻߏ଄Λ࡞Δ࣌͸.BSLEPXOͱͳ ΔͨΊɺݟग़͠ʹ࢖͏͕ίϝϯτߦͱ ͯ͠ίϛοτϝοηʔδ͔Βফ͍͑ͯͨ ΁Μෆศ

    .BSLEPXOͰॻ͘5JQ
  80. ίϝϯτͷจࣈΛ͔Βมߋ͢Δ % git config --global core.commentchar '^' ?ʹมߋ͢Δ w ΋ͪΖΜ?Ͱͳͯ͘΋ྑ͘ɺϓϥοτϑΥʔ

    ϜͰൺֱతߦ಄ʹ࢖Θͳͦ͞͏ͳ΋ͷΛબͿ w ྫ͑͹3VCZͩͱ΍!ͳͲ͸ίϛοτϝο ηʔδͰίʔυྫΛه͠͏ΔͷͰ࢖͑ͳ͍
  81. ίϝϯτͷจࣈΛ͔Βมߋ͢Δ diff --git a/dot.gitconfig b/dot.gitconfig index 07e3ef8..a95eae6 100644 --- a/dot.gitconfig

    +++ b/dot.gitconfig @@ -30,6 +30,7 @@ branch = auto interactive = auto [core] + commentchar = ^ editor = emacsclient -nw -a '' excludesfile = ~/.gitignore [diff] % git config --global core.commentchar '^' HJUDPOpH΁ͷ௥Ճ
  82.  λΠτϧͱҰॹʹຊจΛॻ͘ (JU(JU)VC5JQT

  83. w 1VMM3FRVFTUʹॻ͘͜ͱΛ͋Β͔͡Ίί ϛοτϝοηʔδʹه͢ w ʮίϛοτˠ13࣌ʹॻ͘ʯͰ͸ͳ͘ʮίϛο τ࣌ʹॻ͘ˠ13͸੔ܗ͘Β͍ʯ w Ͳ͏ͤॻ͘ͳΒϒϥ΢βͰ͸ͳ͘޷͖ͳΤ σΟλͰ w

    NBTUFSQVTI͢Δͱ͖ͱྲྀΕΛม͑ͳ͍ λΠτϧͱҰॹʹຊจΛॻ͘
  84. HJUDPNNJU࣌ʹΤσΟλฤू͢Δ

  85. 13࣌ʹλΠτϧຊจ͕ຒ·ͬͯΔ

  86.  $MPTJOHLFZXPSET Λ׆༻͢Δ (JU(JU)VC5JQT

  87. w ίϛοτϝοηʔδʹ'JYFT൪߸ ͳͲؚΉͱ*TTVF΁ͷΫϩʔζ࿈ܞ ʹͳΔ w طʹڍ͕͍ͬͯΔ*TTVF΁ͷϙΠϯ λʹ΋ͳΔར఺͕͋Δ $MPTJOH,FZXPSETΛ׆༻͢Δ

  88. IUUQTIFMQHJUIVCDPNBSUJDMFTDMPTJOHJTTVFTVTJOHLFZXPSET ༗ޮͳΩʔϫʔυ

  89. 'JYFTͷྫ FH *TTVFΛ ࢦఆ͍ͯ͠Δ

  90. 'JYFTͷྫ FH *TTVFΛ·ͱΊͯ ࢦఆ͍ͯ͠Δ

  91. 'JYFTͷྫ FH ϦϙδτϦʹΑΓ λΠτϧهࡌ

  92.  ؔ࿈͢Δίϛοτ͸ TRVBTI͢Δ (JU(JU)VC5JQT

  93. ຬΛ࣋ͯ͠13΁ͷ४උ 1SPCMFN දग़͢Δ໰୊

  94. ຬΛ࣋ͯ͠13΁ͷ४උ $POUFYU ඞཁͳഎܠ

  95. ຬΛ࣋ͯ͠13΁ͷ४උ 8IZ ରҊͱͷൺֱ $POUFYU ඞཁͳഎܠ

  96. 0QFOB13

  97. ࢲͷ3VCP$PQྗ͸ Use ""

  98. None
  99. TRVBTI  HJUQVTIIFBEG

  100. w ϝϯςφ͸ɺϩʔΧϧͰͷ։ൃ ྫ5%% ʹΑΔSFEDPNNJUHSFFO DPNNJUSFGBDUPSDPNNJUͷ ίϛοτཻ౓ʹ͸ڵຯ͕ͳ͍ w 13લͷϩʔΧϧ͸࡞ۀΛҰ۠੾Γͨ͠ ཻ͍౓ɺ13ϚʔδޙͷϦϞʔτ͸มߋ ཤྺΛ௥ཻ͍͍ͨ౓ͱͳΔ

    TRVBTI΁ͷࢥߟ 
  101. w ϝϯςφϯεͰݫີʹॏཁͳͷ͸ҎԼ w ίϛοτͰͭͷมߋཧ༝Ͱ͋Δ͜ͱ w ςετίʔυ͕ηοτͰ͋Δ͜ͱ w ݁࿦13ϨϏϡʔޙʹTRVBTI͢Δ Α͏ٻΊΒΕΔ͕ɺ͜Ε͸ਖ਼͍࢟͠੎ Ͱ͋Δ

    TRVBTI΁ͷࢥߟ 
  102. ͓Ϛʔδ

  103. ϝϯςͷྺ࢙ʹ։ൃ్্ͷ͸ෆཁ ίϛοτʹTRVBTIͯ͠ ෆཁͳίϛοτ͕ݱΕͳ͍

  104. ॱಓ੍উ ͍·͋ΔྗͰಊʑͱίϛϡχςΟʹࢀՃ

  105. w SBJMTSBJMTϦϙδτϦ͔Β͸ɺ3BJMTͷίʔ υ͚ͩͰͳ͘13ͷग़͠ํ͔Βίϛοτϝο ηʔδͷॻ͖ํ΋ֶͿ͜ͱ͕Ͱ͖Δ w ಛʹίϯτϦϏϡʔλ࣌୅͔Βίϛολʔ ʹͳ͍ͬͯΔ3BJMTίϛολʔͷίϛοτ ͸͓खຊʹ͓͢͢Ί ૞ࠪҰ՝՝௕ײ͋Δ 

    w ίϛοτϝοηʔδΛ੍͢Δ΋ͷ͸Ϧϙδ τϦͷྺ࢙ͷ҆ఆΛ੍͢Δ ͓ΘΓʹ
  106. IUUQTUXJUUFSDPNLPJDTUBUVT

  107. 3BJMT044ύονձ ݄࣍։࠵

  108. ࣍ճ݄೔ ݄ ʙFTNʹͯ :PV

  109. None
  110. One more thing…

  111. None
  112. ͋ͱ͸෼͔Γ·͢Ͷʁ ࠾༻ ೥Ҏ্ͷ3BJMTΞϓϦ։ൃͷ࣮੷ l3BJMT044Λ௨͡੒௕͍ͨ͠ϓϩάϥϚʔz @koic·ͰͲ͏ͧ