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

これならしんどくないGit運用の考え方

 これならしんどくないGit運用の考え方

8/20(火) Git運用勉強会 presented by GeekHub (大阪)
発表スライドです

Hisateru Tanaka

August 20, 2019
Tweet

More Decks by Hisateru Tanaka

Other Decks in Technology

Transcript

  1. ͜ΕͳΒ͠ΜͲ͘ͳ͍
    (JUӡ༻ͷߟ͑ํ
    ʙ೉͘͠͠ͳ͍ίπ͸ͪΌΜͱ΍Δ͜ͱʙ

    View full-size slide

  2. ͨͳ͔ͻͯ͞Δ
    @tanakahisateru
    ॴ௕

    View full-size slide

  3. ͬͪ͜ͷ΄͏͕༗໊͔΋

    View full-size slide

  4. ஫͋͘·ͰɺฐࣾͰ͏·͍ͬͯ͘Δߟ͑ํͰ͢

    View full-size slide

  5. ӡ༻͢Δ͏͑Ͱຊ౰ʹ೉͍͠ͷ͸Կ͔
    ❌ػೳͷशಘ
    ⭕ΠϨΪϡϥʔରԠ
    ⭐ҙຯཧղͷڞ༗

    View full-size slide

  6. P0ʮΈΜͳͰ(JUͷػೳΛϚελʔͯ͠࢖͍͜ͳͦ͏ʯ

    ʮͰ͖ΔʯʮݴΘΕ͍ͯΔʯ͔Βͱ͍ͬͯɺͦΕΒ͕
    શͯʮ͢΂͖ʯ͜ͱͱ͸͔͗Βͳ͍ɻ

    View full-size slide

  7. ໎৴
    ͱΈͳ͍ͯ͠Δ͜ͱ

    w ෼ࢄ؅ཧͳͷͰத৺ਓ෺͕͍ͳͯ͘΋Α͍
    w ίϛοτ͸খࠁΈͰ͋Ε͹͋Δ΄ͲΑ͍
    w ཤྺվมʹͳΔͷͰQVTIGΛͯ͠͸͍͚ͳ͍G͸ةݥͩ
    w NBTUFSʹ௚઀ίϛοτΛੵΜͰ͸͍͚ͳ͍
    w ৗʹNFSHFOP⒎ͰϚʔδཤྺΛ࢒͢΂͖
    w ͢΂ͯͷίϛοτͱϒϥϯνΛ՝୊؅ཧνέοτʹؔ࿈෇͚

    View full-size slide

  8. w བྷΈ߹ͬͨෳࡶͳίϛοτάϥϑɺ͍͍ͬͨ୭͕ಡΊΔͷ͔
    w ʮमਖ਼๨ΕͿΜʯ͕ผʹͳ͍ͬͯΔίϛοτɺ᠘Ͱ͔͠ͳ͍
    w ௥Ճ௥ՃͰϋϦϘςʹͳͬͨNBTUFSͷίʔυΛݟͯ΋४ڌ͢Δ
    Ұ؏ੑ͕
    w ػೳΛशಘ͢Δͷ͕ʮ೉͍͠ʯͷͰ͸ͳ͘ɺͦͷػೳͰԿΛ͢Δ͔
    w ʮҙຯ͸஌ΒΜ͕ϧʔϧ͔ͩΒकΕʯͱԡ͠෇͚ΒΕΔ΋ͷ͕ʮ͠
    ΜͲ͍ʯͷਖ਼ମ
    ͳΜ͔ͩ؅ཧͰ͖ͦ͏ͩͧͱ͍͍ؾʹͳ͍ͬͯΔ
    ͚ͩ͡Όͳ͍ͷ͔ɺΑ͘ߟ͑ͯΈΑ͏ɻ

    View full-size slide

  9. ਅ࣮
    ͍ͬ͡͞ʹ͏·͘ճ͍ͬͯΔߟ͑

    w શͯͷมߋΛϨϏϡʔͰ͖ɺΦʔφʔγοϓΛ࣋ͬͨϚʔδϟʔ͕ඞཁ
    w ࡞ۀதͷࢼߦࡨޡ͸ཁΒͳ͍ɻNBTUFSʹର͢Δมߋͷ࠷ऴܾఆ͚ͩΑͤ͜
    w ࡞ۀϒϥϯν͸ݸਓͰઐ༗ɻίϛοτվมG͸׻ܴɻগ͠Ͱ΋ϨϏϡʔ͠΍͢
    ͘͢Δ
    w Ϧʔυ։ൃऀ͸ৗʹNBTUFSΛ௚઀ϦϑΝΫλͯ͠ΫϦʔϯʹ͓ͯ͘͠ νέο
    τෆཁ

    w جຊNBTUFSʹ͸௚ྻੵΈ͢Δɻਓؒ͸෼ذ͕ۤखɻίϯϑϦΫτ͸Ϧϕʔε
    Ͱղফ͓ͯ͘͠
    w ࡞ۀͷओ୊ͱͳΔίϛοτͷΈɺ՝୊؅ཧͱؔ࿈෇͚Δɻա৒ͳ৘ใ͸ίϛϡ
    χέʔγϣϯϊΠζʹͳΔ

    View full-size slide

  10. ͦΕͧΕൺ΂ͯΈΔ

    View full-size slide

  11. 1 ෼ࢄ؅ཧͳͷͰத৺ਓ෺͕͍ͳͯ͘΋Α͍
    WT
    શͯͷมߋΛϨϏϡʔͰ͖ɺΦʔφʔγοϓΛ࣋ͬͨϚʔδϟʔ͕ඞཁ
    ୭ʹฉ͍ͨΒ͍͍͔͙͢Θ͔Δ͠ΜͲ͘ͳ͍
    ϦʔμʔҎ֎ͷϝϯόʔʹεΩϧͷ͹Β͖͕ͭ͋ͬͯ΋໰୊ͳ͠
    ଐਓԽ /P
    Ϧʔμʔ͸શମΛཧղ͍ͯ͠Δ;ͭ͏ਓؒͷ೴͡Όແཧ
    Ͳ͏͢Δ͔ࣗ෼͕๨Ε͍ͯͯ΋ޙͰಡΊ͹Θ͔ΔΑ͏ৗʹ੔ཧ
    ଐਓԽ͠ͳ͍ίʔυΛ࢒͍ͯ͘͠།Ұͷํ๏

    View full-size slide

  12. ฉ͍ͨ࿩ଐਓԽΛආ͚Α͏ͱͯ͠ɺ࡞ۀͱϨϏϡʔͷϖΞΛຖճม͑ͨΒɺ
    ୭΋શମ૾Λ೺ѲͰ͖ͳ͘ͳͬͨ
    जΕ෺ʹ৮ΔΑ͏ʹߦύονɺಈ͚͹͍͍ɺʹͳ͍ͬͯ͘
    ີ݁߹ͱॏෳͷԹচ
    ੔ཧͷํ਑ཱ͕ͨͳ͍ϋϦϘς
    ͦΕͧΕͷ෦෼͕ɺॻ͍ͨਓ͔͠Θ͔Βͳ͍୅෺
    ·͞ʹଐਓԽ ଐਓԽશһ͕ແ੹೚ʹͳΔ͜ͱͷཪฦ͠

    View full-size slide

  13. 2 ίϛοτ͸খࠁΈͰ͋Ε͹͋Δ΄ͲΑ͍
    WT
    ࡞ۀதͷࢼߦࡨޡ͸ཁΒͳ͍ɻNBTUFSʹର͢Δมߋͷ࠷ऴܾఆ͚ͩΑͤ͜
    ίϛοτͷཻ౓͕໌֬͠ΜͲ͘ͳ͍
    w ࡞ۀऀ͕ʮ΍ͬͺΓ͜͏͠Α͏ʯͱ͋Ε͜Ε΍ͬͨܦҢΛ࢒͢ҙຯ
    ͸શ͘ແ͍
    w Ϛʔδϟʔ͸ɺ΍Γ͍ͨ͜ͱͷຊ࣭Λ ΞτϛοΫʹ
    ද͢ɺՄಡͳ
    ࠩ෼͚͕ͩཉ͍͠
    ޙͰؾ͍ͮͨमਖ਼͸͍ͣΕ͔ͷద੾ͳίϛοτʹpYVQͰࠞͥࠐΉ
    ޙͰTRVBTIpYVQͰ͖Δ༨஍͕͋Δͱ͍͏ҙຯͰ͸ɺখ͞ͳί
    ϛοτ͸ڊେίϛοτΑΓϚγ

    View full-size slide

  14. 3ཤྺվมʹͳΔͷͰQVTIGΛͯ͠͸͍͚ͳ͍G͸ةݥͩ
    WT
    ࡞ۀϒϥϯν͸ݸਓͰઐ༗ɻίϛοτվมG͸׻ܴɻগ͠Ͱ΋ϨϏϡʔ͠΍͘͢͢Δ
    ϛεͬͯͯ΋ޙͰͳ͔ͬͨ͜ͱʹͰ͖Δ
    ͠ΜͲ͘ͳ͍
    ͋Ε͜Ε΍ͬͨܦҢ͸ෆཁͳͷͰɺ࡞ۀཤྺ͸ͥͻ੔ཧվมͯͩ͘͠
    ͍͞
    ϦϞʔτͷ্ॻ͖͕ා͍͔ΒGPSDFXJUIMFBTFΛ࢖͑
    QVTIGͰଞਓͷίϛοτΛফͯ͠͠·͏৺഑Λ͍ͯ͠Δ࣌఺Ͱɺ͢
    Ͱʹؒҧͬͯ·͢
    ͻͱͭͷϒϥϯνʹෳ਺ͷਓ͕ॻ͖ࠐΉ4VCWFSTJPOͷUSVOLͰ
    ͔ͦ͢Ε

    View full-size slide

  15. 4 NBTUFSʹ௚઀ίϛοτΛੵΜͰ͸͍͚ͳ͍
    WT
    Ϧʔυ։ൃऀ͸ৗʹNBTUFSΛ௚઀ϦϑΝΫλͯ͠ΫϦʔϯʹ͓ͯ͘͠ νέοτෆཁ

    ෛ࠴αΫαΫฦࡁͰ͖Δ͠ΜͲ͘ͳ͍
    ͻͱͭͷϒϥϯνͷॴ༗ऀ͸ਓ͚ͩ
    ͭ·ΓNBTUFSͷॴ༗ऀ͸ϚʔδϟʔϦʔυ։ൃऀ
    Ϧʔυ։ൃऀʹ͸ɺ͍ͭ୭͕ϒϥϯνΛ੾ͬͯ΋͍͍ঢ়ଶΛҡ࣋͢Δ
    ੹຿͕͋Δ
    ˢ
    ίʔυͷҰ؏ੑΛΩʔϓ͓͔ͯ͠ͳ͍ͱɺಡΜͩਓ͕Կʹशͬͯॻ͘
    ΂͖͔໎͏͔Β
    ίʔυελΠϧɺEPDͱ࣮૷ͷ੔߹ੑɺม਺໊ͷ๏ଇੑɺͳͲ

    View full-size slide

  16. ΋͠NBTUFS͕ຊ౰ʹΫϦʔϯͳΒɺ࡞ۀϒϥϯνʹࣄલϦϑΝΫλͷ
    ޻ఔ͕ඞཁͳ͘ͳΔ
    ຊ࣭తͳίϛοτ͚ͩͰࡁΉͷͰɺ࡞ۀ΋ૣ͍͠ϨϏϡʔ΋͠΍͍͢
    ΋ͪΖΜɺϦʔυࣗ৴͕΍Δػೳมߋʹ͍ͭͯ͸ɺ
    ࡞ۀऀͱಉ͡Α͏ʹϒϥϯνΛ੾Δ΂͖Ͱ͢Α

    View full-size slide

  17. 5 ৗʹNFSHFOP⒎ͰϚʔδཤྺΛ࢒͢΂͖
    WT
    جຊNBTUFSʹ͸௚ྻੵΈ͢Δɻਓؒ͸෼ذ͕ۤखɻ
    ίϯϑϦΫτ͸ϦϕʔεͰղফ͓ͯ͘͠
    มߋॱং௒Θ͔Γ΍͍͢ϚʔδࣄނݮΔ
    ͠ΜͲ͘ͳ͍
    ϚʔδίϛοτΛ࢒ͨ͘͠ͳΔ৺ཧ
    w ϒϥϯνʹҙຯΛٻΊ͍ͯΔ͔Β
    w ίϛοτ͕ҙຯΛද͢ͱࢥ͍ͬͯͳ͍
    w ਐḿ͋Δײʹਁ͍ͬͯΔ͚ͩͰɺத਎ʹڵຯΛ͍࣋ͬͯͳ͍
    ˢٯͰ͢
    ϒϥϯν͸ͨͩͷഔମɺෆՄ෼ͳίϛοτ͕ͦ͜ຊ࣭

    View full-size slide

  18. CMBNFͨ͠ͱ͖ಘΒΕΔͷ͸ͭͷίϛοτ
    ಉ࣌ʹมߋ͞ΕͨϑΝΠϧͳΒ͙͢ʹΘ͔Δ
    ͚ͲɺͲͷϚʔδίϛοτͰNBTUFSʹೖ͔ͬͨɺͦͷͱ͖ͷ࡞ۀϒϥϯ
    νશମͷࠩ෼͸ʜ
    લޙͰࢬ෼͔Ε͠·͍ͬͯͨ͘Βɺ΋͏ਖ਼͘͠ಡΊΔਓ͸͍·ͤΜ

    View full-size slide

  19. ࡞ۀϒϥϯνΛNBTUFSͷ)&"%ʹϦϕʔε
    ʜͳΒɺ్தͰى͖ΔίϯϑϦΫτղফ͸ɺ࡞ۀϒϥϯν಺ͷ໰୊
    NBTUFSʹؒҧ͍͕ೖΔϦεΫ͕ͳ͍

    ࡞ۀϒϥϯνͳΒɺQVTIޙ΋ςετࣦഊ͠์୊Ͱ͢
    લ౗͠ͰϦϕʔεͨ͠΋ͷΛɺ͞Βʹ࡞ۀܧଓ͢Δ༨஍΋͋Γ·͢
    ϚʔδίϛοτͰͷίϯϑϦΫτղফ͢Δͱʜ
    ࠷ޙͷ࠷ޙͰNBTUFS্ͷҰൃউෛ
    ޙͰϛεʹؾ͍ͮͯ΋ɺऔΓฦ͕͔ͭ͠ͳ͍
    ίʔυߦΛ͢΂ͯ௚ͯ͠΋ɺҙຯతͳໃ६ʹΑΔόάͷϦεΫ͕͋Γ·͢

    View full-size slide

  20. ͢΂ͯͷίϛοτͱϒϥϯνΛ՝୊؅ཧνέοτʹؔ࿈෇͚Α
    WT
    ࡞ۀͷओ୊ͱͳΔίϛοτͷΈɺ՝୊؅ཧͱؔ࿈෇͚Δɻ
    ա৒ͳ৘ใ͸ίϛϡχέʔγϣϯϊΠζʹͳΔ
    ͍ΒΜίϛοτݟͳ͍͍ͯ͘͠ΜͲ͘ͳ͍
    ࡞ۀϒϥϯνʹ͸ɺຊ౰ʹ΍Γ͍ͨ͜ͱҎ֎ͷίϛοτ͕ೖΔ
    w NBTUFSʹ·ͩΠέͯͳ͍ίʔυ͕͋ͬͨͷΛ௚͔ͯ͠Β
    w ૝ఆ͞Εͯͳ͔֦ͬͨுͷԼ४උ͕ඞཁɺͳͲ
    શ෦ؔ܎෇͚͍ͯͨΒɺJTTVFϖʔδ্ͰɺԿ͕େࣄͳؔ࿈ίϛοτ
    ͳͷ͔Θ͔Βͳ͘ͳΔ
    Ϧϕʔε࠶QVTI͕ى͖Δͱ͞Βʹ஍ࠈ
    ΍͚ͦ͘ʹશ෦࢒ͨ͘͠ͳΔͷ͸ɺେࣄͳίϛοτΛΞϐʔϧ͍ͨ͠
    ͱ͍͏ҙ͕ࣝͳ͍ূڌ
    6

    View full-size slide

  21. ௚ྻੵΈ্͛ʹͨ͠ͱ͖ɺ՝୊؅ཧͱϦϯΫ͠ͳ͍ͦͷଞͷίϛοτ͸ɺ
    Ϧʔυ։ൃऀͷϦϑΝΫλίϛοτͱಉ͡Ґஔ͚ͮʹͳΔ
    ΋ͱ͸ͻͱͭͷϒϥϯνͩͬͨ෦෼
    ϦϑΝΫλ
    ϦϑΝΫλ

    View full-size slide

  22. ؾ͖ͮ·͔ͨ͠
    044ϓϩδΣΫτͷϩάɺΈͳ͞Μ͍͍ͩͨ͜͏ݟͯ·͢ΑͶ
    (JU)VCͷ044ϓϩδΣΫτ΋ͬͱ΋Ұൠతͳܗͷ(JUӡ༻
    Ͱ͖ΔਓͳΒΈΜͳΑ͘஌ͬͯΔύλʔϯͲΜͳಠࣗӡ༻ϧʔϧΑΓ΋ڧྗ
    ཧղͷώϯτ
    ίϛοτΉ͔͠ύονϑΝΠϧͩͬͨ΋ͷ
    ϒϥϯνͷϓϧϦΫύονϑΝΠϧΛఴ෇͍ͯͨ͠ϝʔϧ

    View full-size slide

  23. 044Ͱͷ(JU࠷େͷϝϦοτ
    ָ؍తϩοΫઓུ
    ൵؍తϩοΫ
    ୭͔͕ϦιʔεΛѲͬͨΒɺଞͷਓ͸࡞ۀ։࢝Λ଴ͨͳͯ͘͸͍
    ͚ͳ͍
    ָ؍తϩοΫ
    ୭Ͱ΋͍ͭͰ΋࡞ۀΛ࢝ΊΒΕΔɻ݁Ռతʹڝ߹ͨ͠৔߹ͷΈɺ
    ૣ͍΋ͷউͪ
    ˢ
    ޙͰڝ߹͠ͳ͚Ε͹ฒྻޮ཰

    View full-size slide

  24. Ͳ͏΍ͬͯڝ߹Λආ͚Δͷ͔
    ʮϞδϡʔϧ͕มߋཧ༝ʹରͯ͠ด͍ͯ͡Δʯ
    Α͏ʹ͢Δ
    w 40-*%ͷ։์ด࠯ݪଇ 0$1
    ͷผͷݴ͍ํ
    w 0$1֦ுʹରͯ͠Φʔϓϯʹɺมߋʹରͯ͠Ϋϩʔζʹ
    w ͭ·Γˠ͋ΔϞδϡʔϧΛมߋ͍ͨ͠ͱ͖ɺଞͷϞδϡʔϧʹมߋΛՃ͑Δ

    ඞཁ͕͋Δͷ͸μϝͳ෼͚ํͰ͢
    /Pີ݁߹ :FTૄ݁߹

    View full-size slide

  25. ͦΕʹͨͬͯ͠Ϧʔμʔͷ
    ଘࡏେ͖͗͢ͳ͍
    w ؅ཧ্ͷݖݶ͚ͩݟΕ͹ɺͱͯ΋ڧ͍͠੹೚΋େ͖͍ͷ͸͔֬
    w ͍΍Ͱ΋͜Εɺөը؂ಜͱಉ͡ͱ͍͑͹Ͳ͏
    w ֤ϝϯόʔ͸ɺ໾ऀͰ͋ΓΧϝϥͰ͋ΓͦΕͧΕɺ

    ؂ಜ͚ͩͰ͸Ͱ͖ͳ͍͜ͱʹೳྗΛൃش͢Δ੹຿Λ͍࣋ͬͯΔ
    w ؂ಜ͸શελοϑͷ੒Ռʹ໨Λ௨ͯ͠ɺཧղ͠ɺత֬ͳࢦࣔΛग़͢
    w ࣗ͘͝વͳ΋ͷͮ͘ΓͷϓϩηεͰ͢Ͷ
    ΋͠ɺ໾৬্͕ͳ͚ͩͷແೳ͕؂ಜʹͳͬͯɺཧղͳ͠ͰөըΛࡱͬͨΒ͸͍΋͏Ͷ

    View full-size slide

  26. ͪΌΜͱ
    w ೳྗͱ੹೚ײΛ࣋ͬͨϦʔυ։ൃऀΛཱͯͯ৴པ͢Δ
    w શମΛঠѲ͢Δ͔Βͦ͜ଐਓԽ͠ͳ͍ίʔυΛ࢒ͤΔ
    w ܗࣜత؅ཧͱΤϏσϯεओମతͳ഑ྀͷܧଓ

    ˠ੒௕ʹͭͳ͕Δ
    w ίϛοτ͸ҙਤͷ఻ୡʹ࢖͏΋㱠ػցతͳ࣌ܥྻόοΫΞοϓ
    w ίϯϑϦΫτରࡦಁ໌ੑૄ݁߹0$1

    ˢ໧ͬͯܧଓతʹϦϑΝΫλ

    View full-size slide

  27. w ҙࣝߴ͍Ͱ͔͢
    w Ͱ΋ɺΤϯδχΞͱͯ͠౰ͨΓલͷૉ๿ͳ͜ͱͰ͢ΑͶ
    w ϓϩδΣΫτͷͦ΋ͦ΋ͷૉੑΛྑ͘͢Δ͜ͱ͕ɺ΋ͬͱ
    ΋ޮՌͷߴ͍(JUͷӡ༻ख๏Ͱ͢

    View full-size slide

  28. ʮ؅ཧख๏ཱ͕֬͑͢͠͞Ε͹ɺཧղ͠߹͏౒ྗΛආ͚Δ͜ͱ͕Ͱ͖ΔͷͰ͸ʯ
    ͦΜͳͷໝ૝ͩͬͯ͜ͱɺ͜Ε·Ͱͷྺ࢙͕ͣͬͱɺূ໌͠ଓ͚ͯΔ͡Όͳ͍Ͱ͔͢
    ͪΌΜͱ㱠ෳࡶͰແବͷଟ͍ӡ༻ϧʔϧΛؒҧ͍ͳ͘΍Δ͜ͱ
    ͦΕͦࣗ͜ಈԽ͢΂͖ඇਓؒతͳߦҝ͡Όͳ͍ ޻ֶతʹ

    View full-size slide

  29. ΤϯδχΞͱͯ͠ʮͪΌΜͱ΍Δʯ
    ਓؒͷෛ୲ΛݮΒͯ͠ɺ
    ΑΓຊ࣭ʹؔ৺Λ޲͚Δ
    ӡ༻ϧʔϧΛ૿΍͢ͱίʔυͷ඼࣭͸Լ͕Δ
    ඼࣭Λ্͛ͯϧʔϧΑΓϞϥϧͰ΍͍ͬͯ͘

    View full-size slide