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

Git勉強しよう会 #1

okutani
February 14, 2018

Git勉強しよう会 #1

コミュン渋谷でおこなった「Git勉強しよう会」第1回目の資料です

okutani

February 14, 2018
Tweet

More Decks by okutani

Other Decks in Programming

Transcript

  1. Gitษڧ͠Α͏ձ #1
    2018/01/20
    okutani
    ौ୩ίϛϡϯ

    View full-size slide

  2. ࣗݾ঺հ
    ✤PLVUBOJ

    wࡀ
    w8FCܥΤϯδχΞ
    wϑϦʔϥϯε೥໨
    wझຯ͸٢঵ࣉ८Γ

    View full-size slide

  3. ࠓ೔ͷΞδΣϯμ
    ᶃ͸͡Ίͯͷ(JU
    ᶄ͸͡Ίͯͷ(JU)VC
    ᶅΈΜͳͰαΠτΛ࡞ͬͯΈΑ͏ʂ
    ᶆϓϧϦΫΤετͰ։ൃͯ͠ΈΑ͏

    View full-size slide

  4. ΞΠεϒϨΠΫλΠϜʂ❄

    View full-size slide

  5. ΞΠεϒϨΠΫ
    ᶃ͔ΜͨΜͳࣗݾ঺հ
    ᶄࠓͷ࢓ࣄʢֶੜ͞Μ͸ษڧʣ

    Λ͢Δ͜ͱʹͳ͖͔͚ͬͨͬ✏
    ※ͻͱΓ3෼͙Β͍

    View full-size slide

  6. 1. ͸͡ΊͯͷGit

    View full-size slide

  7. Gitͬͯͳʹʁ

    View full-size slide

  8. όʔδϣϯ؅ཧπʔϧ

    View full-size slide

  9. ͬͯͳʹʁʁʁ

    View full-size slide

  10. (JUͬͯͳʹʁ

    View full-size slide

  11. (JUͬͯͳʹʁ
    ࠓ೔΋։ൃ
    ͕Μ͹Δ͍ͧʂ

    View full-size slide

  12. (JUͬͯͳʹʁ

    View full-size slide

  13. (JUͬͯͳʹʁ
    ......

    View full-size slide

  14. (JUͬͯͳʹʁ
    ͏Θ͋͋͋͋͋͋͋
    ͋͋͋͋͋͋͋͋͋

    View full-size slide

  15. (JUͬͯͳʹʁ
    ͏Θ͋͋͋͋͋͋͋
    ͋͋͋͋͋͋͋͋͋
    GitΛ࢖͓͏ʂ

    View full-size slide

  16. Gitͬͯ
    Ͳ͏΍ͬͯ࢖͏ͷʁ

    View full-size slide

  17. 1. λʔϛφϧ
    ʢࠇ͍ը໘ʣ

    View full-size slide

  18. 2. ΞϓϦ
    ʢιʔεπϦʔͱ͔ʣ

    View full-size slide

  19. ࠓ೔͸
    λʔϛφϧ
    Ͱ΍ͬͯΈΑ͏

    View full-size slide

  20. ʲλʔϛφϧΛ্ཱͪ͛Δ࣌ؒʳ

    View full-size slide

  21. ্ཱ͕ͪΓ·͔ͨ͠ʁ

    View full-size slide

  22. λʔϛφϧʹ
    ίϚϯυΛ
    ଧ͍͖ͬͯ·͠ΐ͏

    View full-size slide

  23. ࣍ͷίϚϯυΛଧͬͯΈΑ͏ʂ
    ᶃNLEJSpSTUHJU
    ᶄDEpSTUHJU
    ᶅUPVDIOJLLJUYU
    ᶆMT
    ※ $͸ଧͨͳͯ͘OK

    View full-size slide

  24. ίϚϯυղઆ
    ᶃNLEJSpSTUHJU
    ᶄDEpSTUHJU
    ᶅUPVDIOJLLJUYU
    ᶆMT
    σΟϨΫτϦ
    ࡞ͬͯΔ
    Ҡಈͯ͠Δ
    ϑΝΠϧ
    ࡞ͬͯΔ
    Ұཡදࣔ

    View full-size slide

  25. ϑΝΠϧ͕࡞Εͨʂ

    View full-size slide

  26. nikki.txtΛ։͍ͯ
    ࡢ೔ͷͰ͖͝ͱΛ
    ॻ͍ͯΈΑ͏

    View full-size slide

  27. ʲ೔هΛॻ࣌ؒ͘ʳ

    View full-size slide

  28. ࡢ೔ͷͰ͖͝ͱ
    ॻ͚·͔ͨ͠ʁ

    View full-size slide

  29. ͡Ό͋
    GitͰ؅ཧ
    ͍͖ͯ͠·͠ΐ͏ʂ

    View full-size slide

  30. (JUίϚϯυΛ࢖ͬͯΈΑ͏ʂ
    ᶃHJUJOJU
    ᶄHJUBEEOJLLJUYU
    ᶅHJUDPNNJUN͸͡Ίͯͷ೔ه
    ᶆHJUMPH
    ※ $͸ଧͨͳͯ͘OK

    View full-size slide

  31. (JUίϚϯυղઆ
    HJUJOJU
    (JUΛ࢖͏४උΛ͢ΔΑʢҰ൪࠷ॳ͚ͩ࢖͍·͢ʣ

    View full-size slide

  32. (JUίϚϯυղઆ
    HJUBEEOJLLJUYU
    ه࿥ʹ࢒͍ͨ͠ϑΝΠϧΛબ୒͢ΔΑ
    ࠓ೔ॻ͍ͨ೔هΛ
    ه࿥͍ͨ͠ʂ

    View full-size slide

  33. (JUίϚϯυղઆ
    HJUDPNNJUNίϝϯτ
    (JUͰه࿥͢ΔΑʢίϝϯτ෇͖ʣ
    ه࿥ʂʢίϛοτʣ

    View full-size slide

  34. (JUίϚϯυղઆ
    HJUMPH
    (JUͷه࿥͕ݟΕΔΑʢRΩʔͰऴྃʣ

    View full-size slide

  35. Git͕࢖͑ͨ

    View full-size slide

  36. nikki.txtʹ
    Կ࣌ʹى͖ͯ
    Կ࣌ʹ৸͔ͨ
    Λ௥هͯ͠
    Gitʹొ࿥ͯ͠ΈΑ͏

    View full-size slide

  37. ʲ೔هΛߋ৽͢Δ࣌ؒʳ

    View full-size slide

  38. Ͱ͖·͔ͨ͠ʁ

    View full-size slide

  39. ͜ΕͰ͋ͳͨ΋
    GitϚελʔ

    View full-size slide

  40. લ൒ऴྃ

    View full-size slide

  41. ޙ൒͸
    ࢖͍͖ͬͯ·͢

    View full-size slide

  42. ٳܜλΠϜ
    ʢ10෼͙Β͍ʣ

    View full-size slide

  43. 2. ͸͡ΊͯͷGitHub

    View full-size slide

  44. GitHubͬͯͳʹʁ

    View full-size slide

  45. GitͰ؅ཧͨ͠
    ϓϩδΣΫτΛ
    ΈΜͳͰฤूͰ͖Δ
    WebαʔϏε

    View full-size slide

  46. IUUQTHJUIVCDPN͔Βར༻Ͱ͖ΔΑ

    View full-size slide

  47. (JU)VC͔ΜͨΜղઆ

    View full-size slide

  48. (JU)VC͔ΜͨΜղઆ
    pushʂ

    View full-size slide

  49. (JU)VC͔ΜͨΜղઆ
    pushʂ pullʂ

    View full-size slide

  50. (JU)VC͔ΜͨΜղઆ
    pushʂ pullʂ
    ΈΜͳͰ։ൃʂ

    View full-size slide

  51. ΦΫτΩϟοτ͕
    ͔ΘΏ͍

    View full-size slide

  52. GitHubΛ࢖ͬͯ

    View full-size slide

  53. 3. ΈΜͳͰαΠτΛ
    ࡞ͬͯΈΑ͏ʂ

    View full-size slide

  54. ࿅श༻ϦϙδτϦΛ֬ೝ͠Α͏
    IUUQTHJUIVCDPNPLVUBOJUHJUTUVEZ
    ʹΞΫηεʂ

    View full-size slide

  55. ࿅श༻ϦϙδτϦΛ֬ೝ͠Α͏

    View full-size slide

  56. ϦϙδτϦΛμ΢ϯϩʔυ͠Α͏ʂ
    ᶃDEdʢݩͷ৔ॴʹ໭ΔίϚϯυʣ
    ᶄHJUDMPOF͖ͬ͞ίϐʔͨ͠63-
    ᶅDEHJUTUVEZ

    View full-size slide

  57. αΠτΛॻ͖׵͑ͯQVTIͯ͠ΈΔʢ%&.0ʣ
    ᶃαΠτΛมߋ
    ᶄHJUBEE"
    ᶅHJUDPNNJUNαΠτΛมߋ
    ᶆHJUQVTIPSJHJONBTUFS

    View full-size slide

  58. HJUQVTIղઆ
    HJUQVTIPSJHJONBTUFS
    ※ ͱΓ͋͑ͣࠓճ͸ؙ҉هͰOK
    ϦϙδτϦͷ৔ॴΛ
    ࢦఆ͍ͯ͠ΔΑ
    ϒϥϯνͷ໊લΛ
    ࢦఆ͍ͯ͠ΔΑ

    View full-size slide

  59. ϓϩδΣΫτΛQVMMͯ͠ΈΑ͏ʢΈΜͳͷ࡞ۀʣ
    ᶃHJUQVMMPSJHJONBTUFS
    ※ $͸ଧͨͳͯ͘OK

    View full-size slide

  60. αΠτ
    ߋ৽
    ͞Εͯ·͔ͨ͠ʁ

    View full-size slide

  61. ͜ΕͰ
    ΈΜͳͰ
    ։ൃ͕Ͱ͖·͢Ͷ

    View full-size slide

  62. 4. ϓϧϦΫΤετͰ
    ։ൃͯ͠ΈΑ͏

    View full-size slide

  63. ϓϧϦΫΤετͬͯͳʹʁ

    View full-size slide

  64. ίʔυΛ
    ϨϏϡʔͯ͠
    ։ൃʂ

    View full-size slide

  65. ϒϥϯνΛ੾ͬͯΈΑ͏
    ᶃHJUCSBODIϒϥϯν໊
    ᶄHJUDIFDLPVUϒϥϯν໊

    View full-size slide

  66. ϒϥϯνΛ੾ͬͯΈΑ͏
    ᶃHJUCSBODIϒϥϯν໊
    ᶄHJUDIFDLPVUϒϥϯν໊
    ৽͍͠ϒϥϯνΛ࡞ͬͯΔΑ
    ࡞ͬͨϒϥϯνʹҠಈ͍ͯ͠ΔΑ

    View full-size slide

  67. ϒϥϯνͬͯͳʹʁʁʁ

    View full-size slide

  68. ϒϥϯν͸
    ίϛοτͷه࿥Λ
    ෼ذ
    ͤ͞Δٕʂ

    View full-size slide

  69. ϒϥϯνͷ֬ೝ
    HJUCSBODI

    View full-size slide

  70. ϒϥϯνͷ֬ೝ
    HJUCSBODI
    ࡞੒ͨ͠ϒϥϯν
    ʢࠓ͍Δϒϥϯνʣ
    ͖ͬ͞·Ͱ͍ͨϒϥϯν
    ʢຊ൪༻ͷϒϥϯνʣ

    View full-size slide

  71. ϒϥϯνΛ࢖͏ͱ
    ػೳ͝ͱʹ
    ։ൃΛਐΊΒΕ·͢ʂ

    View full-size slide

  72. 1. ͓໰͍߹Θͤϖʔδ࡞੒ϒϥϯν
    2. όφʔ௥Ճϒϥϯν
    3. ϝʔϧ഑৴γεςϜ࣮૷ϒϥϯν
    etc...

    View full-size slide

  73. ͸͡ΊͯͷϒϥϯνΛ࡞ͬͯΈΑ͏
    ᶃHJUCSBODIPLVUBOJ
    ᶄHJUDIFDLPVUPLVUBOJ
    ࣗ෼ͷ໊લͰϒϥϯνΛ࡞ͬͯΈ·͠ΐ͏

    View full-size slide

  74. ࡞ͬͨϒϥϯνͰ
    αΠτ੍࡞ΛਐΊͯ
    GitHubʹpushͯ͠ΈΑ͏

    View full-size slide

  75. (JU)VCʹQVTIͯ͠ΈΑ͏ʂ
    ᶃαΠτΛมߋ
    ᶄHJUBEE"
    ᶅHJUDPNNJUNίϝϯτ
    ᶆHJUQVTIPSJHJOPLVUBOJ
    ࣗ෼ͷ໊લͷϒϥϯνΛpushʂ

    View full-size slide

  76. ϓϧϦΫΤετͰNBTUFSʹNFSHF͞ΕͨΒ
    ᶃHJUDIFDLPVUNBTUFS
    ᶄHJUQVMMPSJHJONBTUFS
    ͜ΕͰߋ৽͞Εͨຊ൪σʔλ͕औಘͰ͖Δ

    View full-size slide

  77. ͳʹΛ΍ͬͯΔ͔
    Α͘෼͔Βͳ͔ͬͨ

    View full-size slide

  78. ࣮ફ͋ΔͷΈʂ

    View full-size slide

  79. ʲϓϧϦΫΤετΛ࢖ͬͯ
    αΠτΛΫϦΤΠτ͢Δ࣌ؒʳ

    View full-size slide

  80. ͔͍͍ͬ͜αΠτ
    ࡞Ε·ͨ͠ʁ

    View full-size slide

  81. ͜ΕͰ͋ͳͨ΋
    GitHubϚελʔ

    View full-size slide

  82. ͜Ε͔Β͸
    Gitͱ
    GitHubΛ
    ׆༻͍͖ͯ͠·͠ΐ͏

    View full-size slide

  83. ຊ೔͸
    ͋Γ͕ͱ͏͍͟͝·ͨ͠

    View full-size slide

  84. ෇࿥ʢϢʔβʔ໊ͱϝʔϧΞυϨεొ࿥ʣ
    ᶃHJUDPOpHHMPCBMVTFSOBNF໊લ
    ᶄHJUDPOpHHMPCBMVTFSFNBJMϝʔϧΞυϨε
    ᶅHJUDPOpHMJTUʢ֬ೝίϚϯυʣ

    View full-size slide