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

Being successful with GitHub

Takafumi Ikeda
September 05, 2016

Being successful with GitHub

Another version combined with what VCS is.

Takafumi Ikeda

September 05, 2016
Tweet

More Decks by Takafumi Ikeda

Other Decks in Technology

Transcript

  1. # Where software is built # $ 3 TAKAFUMI IKEDA

    SOLUTIONS ENGINEER Who am I?
  2. How software is built % For Internal Only - Confidential

    / 2015 ਺ࣈͰݟΔGitHub 12 % ࠾༻͍ͯ͠Δ େֶͷ਺ 1,000+ ొ࿥Ϣʔβʔ਺ 1,500ສ ϦϙδτϦ਺ 3,800ສ ར༻اۀɾஂମ਺ 60,000+ ೔ຊ͔Βͷ݄ؒ ๚໰ऀ਺ 70ສ ೔ຊͷ͓٬༷਺ 1,400+
  3. ! Where software is built GitHubҎલ 20 ! " #

    " $ " % " & " ' " ( " ) " x " $ " % " & " ' " ( " ) " ! "
  4. How software is built % For Internal Only - Confidential

    / 2015 26 & OPEN SOURCE LEADERS SOFTWARE SPECIALISTS FORWARD THINKING ENTERPRISES GitHub ͷ࠾༻ൣғ
  5. Where software is built ιϑτ΢ΣΞ͕ੈքΛҿΈࠐΉ 28 ' ! Ϣʔβʔ͸ੈքதͲ͜ Ͱ΋ಉ͡༏ΕͨϢʔβʔ

    ମݧΛٻΊ͍ͯ·͢ ٕज़ͷਐา͕͋ΒΏΔ ࢈ۀͷ͋ΓํΛม͑ͭ ͭ͋Γ·͢ &
  6. ! Where software is built 29 ( ) χʔζ ͍ۤ͠ϙΠϯτ

    • ߴ͍ੜ࢈ੑ • ૉ੖Β͍͠Ϣʔβʔମݧͱߴ͍඼࣭ • ਝ଎͔ͭΠϊϕʔςΟϒͳ੡඼ • ͱͯ΋஗͘ɺ৴པग़དྷͳ͍։ൃϑϩʔ͓ΑͼϦϦʔεϑϩʔ • ίʔυϨϏϡʔ΋CI΋ͳ͘ɺσάϨ͕සൃ • ಁ໌ੑ͕௿͘ɺଞ෦ॺ͕ԿΛ͍ͯ͠Δ͔Θ͔Βͳ͍ɺंྠͷ࠶ൃ໌ ͍·։ൃݱ৔ͰԿ͕ى͖͍ͯΔͷ͔
  7. How people build software % όʔδϣϯ؅ཧγεςϜͱ͸ 36 • ϑΝΠϧͷ൛ʢόʔδϣϯʣΛ؅ཧ͢ΔͨΊͷπʔϧͷ͜ͱ •

    ྺ࢙Λه࿥͠ɺಛఆͷྺ࢙ʹ໭ͬͨΓ͢Δ͜ͱ͕Ͱ͖·͢ • ͍ͭɺͩΕ͕ɺͳʹΛɺͨ͠ͷ͔Λ؅ཧͰ͖·͢ • ෳ਺ਓͰಉ࣌ฒߦͰ࡞ۀΛ͢Δ͜ͱ͕Ͱ͖ΔΑ͏ʹͳΓ·͢
  8. How people build software % ೔෇؅ཧͷ໰୊ 37 • ϑΝΠϧؒͷࠩ෼Λ֬ೝ͢Δ͜ͱ͕Ͱ͖ͳ͍ •

    ಉ໊͡લͩͱ্ॻ͖ͯ͠͠·͏ • ಉ࣌ฒߦ࡞ۀ͕Ͱ͖ͳ͍ • ೔෇͕ಉͩ͡ͱͲΕ͕࠷৽ͳͷ͔͕Θ͔Βͳ͘ͳΔ • ͍ͭ୭͕ԿΛͨ͠ͷ͔Θ͔Βͳ͘ͳΔ
  9. How people build software % ೔෇؅ཧͰԿ͕ى͖Δ͔ 38 file-a-2015-11-15.txt file-a-2015-11-16.txt file-a-2015-11-16-new.txt

    file-a-2015-11-17.txt ϑΝΠϧ໊͔Β࡯͢Δʹɺཧ૝తʹ͸͜͏͍͏ྺ࢙ʹͳ͍ͬͯΔͱࢥ͍͍ͨ
  10. How people build software % ೔෇؅ཧͰԿ͕ى͖Δ͔ 39 John Sam file-a-2015-11-15.txt

    John Sam Mary file-a-2015-11-16.txt John Sam David file-a-2015-11-16-new.txt John
 Sam David Jess file-a-2015-11-17.txt ݱ࣮ʹ͸͜͏ͳ͍ͬͯΔՄೳੑ͕͋Δ ͜ͷมߋ͸ফࣦ͢Δ
  11. How people build software % όʔδϣϯ؅ཧͰͲ͏มΘΔ͔ 40 John Sam file-a.txt

    John Sam Mary file-a.txt John Sam David file-a.txt John Sam Mary David Jess file-a.txt ಉҰϑΝΠϧͷྺ࢙Λໃ६ͳ͘อͭ͜ͱ͕Ͱ͖Δ িಥΛݕ஌͠ɺϚʔδΛଅ͢ͷ͕όʔδϣϯ؅ཧγεςϜͷجຊػೳ ϑΝΠϧ໊ʹ೔෇͸ෆཁ িಥʂ John Sam Mary David file-a.txt Ϛʔδ
  12. How people build software % ͳͥϒϥϯν͕ඞཁͳͷ͔ 42 ͔͜͜ΒςετΛ࢝ΊΑ͏ मਖ਼ ผͷਓͷमਖ਼

    ͞Βʹผͷਓͷमਖ਼ ͞Βʹ͞Βʹ ςετ͍ͯ͠Δؒʹςετର৅͕ ͲΜͲΜมΘͬͯ͠·͏ʂ • ։ൃதͷ΋ͷͱग़ՙ༻ͷ΋ͷΛͲ͏۠ผͯ͠؅ཧ͢Δ͔ͱ͍͏໰୊ • ΋͠MasterϒϥϯνҰຊ͔͠ͳ͍ͱɻɻɻ
  13. How people build software % ੜଘظؒͷ௕͍ϒϥϯν͸඼࣭Λ௿Լͤ͞Δ 44 ͔͜͜ΒςετΛ࢝ΊΑ͏ ςετ׬ྃ ࠩҟ͕ஶ͍͠

    मਖ਼ ผͷਓͷमਖ਼ ςετʹ ର͢Δमਖ਼ • ϒϥϯνΛ௕͘อͯ͹อͭ΄Ͳϒϥϯνؒͷࠩҟ͕ܹ͘͠ • Ϛʔδ͕ࠔ೉ɺ݁Ռϒϥϯν΋Ͱ͖Δ͚ͩ࡞੒͠ͳ͍Α͏ʹ • Subversion·Ͱͷ࣌୅͸͜ͷ໰୊Λօ๊͕͍͑ͯͨ
  14. How people build software % ϒϥϯνͷੜଘظؒΛ୹͘ 45 ࡞ۀ͕ऴΘΓ࣍ୈ͙͢Ϛʔδ ੜଘظ͕ؒ୹͚Ε͹ Ϛʔδ΋؆୯

    • ϒϥϯνΛ࡞Δͷ͕؆୯ͰɺϚʔδ͢Δͷ͕؆୯Ͱ͋Δ͜ͱ͕ॏཁ • SubversionҎલͰ͸Ͱ͖ͳ͍ܳ౰ • Gitͷ༏Ґੑ
  15. How people build software % GitHub Flow 47 * +

    , - - - Create a Branch Open a Pull Request Merge and deploy
  16. ! Where software is built GitHub Flow! 49 * +

    , - - - Create a Branch Open a Pull Request Merge and deploy
  17. ! Where software is built 52 * + ϦεΫͳ͠Ͱ࣮ݧͰ͖Δ ϒϥϯνͷੜଘظؒΛ୹͘Ͱ͖Δ

    • ࣗ෼ͷϒϥϯν্Ͱ͸ͳΜͰ΋Ͱ͖Δ • ଞਓͷ࡞ۀΛअຐ͢ΔϦεΫ͕ͳ͍ɺଞਓʹअຐ΋͞Εͳ͍ • ϒϥϯνͷ࡞੒͸ߴ଎Ͱ҆શ͔ͭ؆୯ʹͰ͖Δ • ४උ͕Ͱ͖ͨΒ͙͢ʹϚʔδ͠ɺ͙͢ʹ࡟আͰ͖Δ • ظؒͷ௕͍ϒϥϯν͸ίϯϑϦΫτ͕ى͖΍͘͢ͳΓϚʔδ͠ʹ͍͘ • ϒϥϯνΛ࡟আ͢Δͷ΋҆શͰߴ଎ʹͰ͖Δ ϒϥϯν࡞੒͕ߴ଎Ͱ҆શ͔ͭ؆୯
  18. ! Where software is built Pull RequestͰٞ࿦ͱϨϏϡʔ͕Ͱ͖Δ 55 - ୭Ͱ΋ר͖ࠐΜͰ

    ։ൃͰ͖Δ ؔ܎ऀશһΛר͖ࠐΜͰ࢓༷΍ཁ݅ʹͭ ͍ͯٞ࿦͕Ͱ͖Δ ϓϩάϥϚ͚ͩͰͳ͘ɺاըऀɺઃܭऀɺ QA୲౰ऀ͸΋ͪΖΜɺHR΍๏຿ɺܦཧ ͳͲͱ΋ίϥϘϨʔγϣϯ͕Մೳ
  19. ! Where software is built 57 * + , -

    - - Create a Branch Open a Pull Request Merge and deploy
  20. ! Where software is built Ϛʔδ͢Δલʹςετ͢Δ͜ͱ͕Ͱ͖Δ 59 . CI ON

    PR IS THE BEST PRACTICE ࠓ೔ʹ͓͍ͯɺCI͸ඞਢͷϓϥΫςΟε Pull Requestʹରͯ͠CIΛ࣮ࢪ͢Δ͜ͱ ͕ۙ೥ඞਢͱͳͬͨϕετϓϥΫςΟε ͜ΕʹΑͬͯɺίʔυϨϏϡʔʹूத͢ Δ͜ͱ͕Ͱ͖Δ
  21. ! Where software is built Pull Requestʹର͢ΔCIͬͯʁ 60 * +

    , MasterͱPull RequestΛ CIαʔό্ͰϚʔδͯ͠ςετ CI݁ՌΛPull Requestʹ ϑΟʔυόοΫ
  22. ! Where software is built Ϛʔδʹ৚݅Λ͚ͭΔ͜ͱ͕Ͱ͖Δ 62 / PROTECTED BRANCHES

    AND REQUIRED STATUSES Status APIΛ࢖͏͜ͱͰɺPRͷϚʔδʹ ৚݅Λ͚ͭΔ͜ͱ͕Ͱ͖Δ CIΛύε͢Δ͜ͱͰ͋ͬͨΓɺԿΒ͔ͷ νΣοΫΛ௨ա͢Δ͜ͱͰ͋ͬͨΓɻ طଘͷ3rdύʔςΟʔͷαʔϏεͷଟ͕͘ طʹରԠࡁ
  23. ! Where software is built 64 * + , -

    - - Create a Branch Open a Pull Request Merge and deploy
  24. ! Where software is built σϓϩΠͷঢ়گ΋ه࿥Ͱ͖Δ 65 0 σϓϩΠAPIΛར༻͠ ͯPRʹཤྺΛ࢒ͤΔ

    PRͷมߋ͕Ͳ͜ʹσϓϩΠ͞Εͨͷ͔ɺ ঢ়گ͸Ͳ͏ͩͬͨͷ͔ɺه࿥͕࢒Δ ޙͰݟฦ͢͜ͱ͕Մೳ
  25. ! Where software is built 68 * + , -

    - - Create a Branch Open a Pull Request Merge and deploy
  26. ! Where software is built Pull Requests୯ҐͰRevert͕Մೳ 70 1 PULL

    REQUEST୯ҐͰ REVERTͰ͖Δ Pull RequestΛϚʔδͨ͠ޙʹ໰ ୊ʹؾ͍ͮͨ৔߹ɺ͜ͷ୯ҐͰ Revert͕Մೳ Revert΋Pull RequestʹͳΓɺCI ΋࣮ࢪͰ͖Δ͠ϨϏϡʔ΋Մೳ
  27. ! Where software is built Pull Requestʹ͋ΒΏΔ৘ใ͕ू·Δ 73 0 ͋ΒΏΔ৘ใ͕PRʹ

    ཤྺͱͯ͠ू·Δ ίϛοτϩά΋ɺձ࿩ͷϩά΋ɺσϓϩ Πͷϩά΋Ϛʔδͷϩά΋ɺ͢΂ͯͷྲྀ ΕΛPull Requestʹू໿͢Δ͜ͱ͕Ͱ͖Δ
  28. ! Where software is built BlameΛ࢖ͬͯίʔυ͔ΒPR·ͰḪΕΔ 75 2 ͍ͭ୭͕Ͳ͏มߋͨ͠ͷ͔ Λ௥੻Ͱ͖Δ

    gitͷblameΛ͞ΒʹUI্ͰΘ͔Γ ΍֬͘͢ೝͰ͖Δ ίʔυ͔ΒPR·ͰḪͬͯ֬ೝ͢ Δ͜ͱ͕Մೳ
  29. ! Where software is built ༏Εͨ։ൃऀɺϓϩδΣΫτʹग़ձ͑Δ 77 3 ༏Εͨ։ൃऀ΍ϓϩδΣΫτ ͸طʹޚࣾͷதʹ

    ༏Εͨ։ൃऀ΍ϓϩδΣΫτ͸طʹޚࣾ ͷதʹଘࡏ͍ͯ͠Δ͕ɺͦΕʹؾͮ͘͜ ͱ͕Ͱ͖ΔΑ͏ʹͳΔ ࣾ಺ʹOSSͷΑ͏ͳจԽΛৢ੒Ͱ͖Δ ͢΂ͯΛݕࡧՄೳͰ͋ΓɺφϨοδϕʔ εͱͯ͠΋໾ʹཱͭ
  30. ! Where software is built ͦͷଞʹ΋ 79 ! ATOM GitHub͕ఏڙ͍ͯ͠ΔOSSͷ

    ςΩετΤσΟλ WebςΫϊϩδΛϕʔεʹ։ ൃ͞Ε͓ͯΓɺ༷ʑʹϋοΫ ͕Մೳͳ༏Εͨπʔϧ HUBOT Hubot͸ͳΜͰ΋΍ͬͯ͘Ε Δ༏ΕͨϩϘοτ ChatπʔϧͱΑ͘౷߹ͯ͠ ༷ʑͳλεΫΛ͜ͳ͢
  31. Where software is built % % ίϚϯυϥΠϯ͸ͪΐͬͱ… 80 • GitHub

    Desktop͕͓͢͢Ίʂ • ௚ײతͰΘ͔Γ΍͍͢UI • ࣗಈతʹPowershellʹGitΛΠϯετʔϧͯ͘͠ΕΔ • SSH伴ͷ؅ཧ΋؆୯ʹͳΔ • ΞϓϦέʔγϣϯ্͔ΒPull RequestΛ࡞Δ͜ͱ΋Մೳ • ແྉɺGitHub EnterpriseͰͷར༻΋Մೳ
  32. Where software is built Breaking Your Silos What silos do

    you unconsciously have in your mind? 83 $
  33. Where software is built % Wrap Up: Breaking Your Silos

    87 • GitHub ʹΑͬͯ • ΞΠσΟΞΛૉૣ͘ɺଞਓΛअຐ͢Δ͜ͱͳ͘ࢼ͢͜ͱ͕Ͱ͖Δ • ։ൃϓϩηεʹ͋ΒΏΔਓΛר͖ࠐΉ͜ͱ͕Մೳʹ • ίʔυͷมߋͱϚʔδΛɺࣗ৴Λ࣋ͬͯߦ͏͜ͱ͕Ͱ͖Δ • ࣾ಺ͷ༏Εͨ࠽ೳ΍ɺ࠶ར༻ՄೳͳίʔυΛݟ͚ͭग़͢͜ͱ͕Մೳʹ • ίʔυͱϓϩδΣΫτʹؔ͢Δ͋ΒΏΔ৘ใ͕ҰՕॴʹ •ڪΕͣࣗ৴Λ࣋ͬͯ։ൃɺίϥϘϨʔγϣϯ͕Մೳʹʂ •αΠϩΛյ͠ɺνʔϜͷજࡏೳྗΛൃشͰ͖ΔΑ͏ʹʂ ! http://www.molemaster.com/industries-cement.asp