Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
どうぶつと学ぶGitの考え方
Search
taniko
April 16, 2024
0
22
どうぶつと学ぶGitの考え方
taniko
April 16, 2024
Tweet
Share
More Decks by taniko
See All by taniko
SLOを考える
hrgruri
0
19
github.ioでブログを 公開しよう
hrgruri
2
3.3k
Featured
See All Featured
A Philosophy of Restraint
colly
203
16k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
506
140k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
Six Lessons from altMBA
skipperchong
27
3.5k
Building Your Own Lightsaber
phodgson
103
6.1k
Being A Developer After 40
akosma
86
590k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
720
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
Transcript
Author: taniko Ͳ͏ͿͭͱֶͿGitͷߟ͑ํ
GitͬͯԿͰ͔͢ʁ όʔδϣϯཧγεςϜͰ͢ɻ ར༻͢ΔͱԿ͕خ͍͠ͷͰ͔͢ʁ ηʔϒϙΠϯτ͕ͨ͘͞Μ࡞ΕͯɺϑΝΠϧͷมߋ͕ཧͰ͖Δ͠ɺ ෳਓͰඇಉظͰ։ൃ͕Ͱ͖ΔΑ
ηʔϒϙΠϯτʁ ͨͱ͑ɺ࡞ۀதͷมߋ͕ෆཁʹͳͬͨ࣌ɺ؆୯ʹΕΔΑ
ηʔϒ ηʔϒ ػೳA ػೳB ػೳBͳͷͰ͕͢ɺཁΒͳ͘ͳͬͪΌͬͨ ݱࡏ ͡Ό͋ػೳAͷ࣮ޙ·ͰΔͶ ػೳA ηʔϒ ηʔϒ
ηʔϒ ηʔϒ ݱࡏ
มߋ ϑΝΠϧA มߋ ϑΝΠϧB มߋ ϑΝΠϧC มߋ ϑΝΠϧD ػೳBͳͷͰ͕͢ɺཁΒͳ͘ͳͬͪΌͬͨ ϑΝΠϧAɺBɺCɺDͷͲͷ෦͕ػೳBʹؔ͢ΔΜ͚ͩͬʁ
ػೳAɺBΛ։ൃ
ηʔϒϙΠϯτΛ࡞ͬͯɺཧ͓ͯ͘͠ͱɺ؆୯ʹΕΔΜͩͶ ͦΕ͔ΒɺGitͰɺηʔϒϙΠϯτͷ͜ͱΛίϛοτ(Commit)ͱݴ͏Α ίϛοτͰϑΝΠϧཧ͕͘͢͠ͳΔͷɺΘ͔͚ͬͨͲɺ ෳਓͰඇಉظͰ։ൃ͕Ͱ͖ΔͬͯɺͲ͏͍͏ҙຯʁ ͦΕɺϒϥϯνػೳΛ͏ΜͩΑ
ϒϥϯνػೳͬͯͳʹʁ ֤ʑ͕࡞ۀ༻ͷۭؒΛ࡞ͯ͠ɺͦ͜Ͱ։ൃ͕Ͱ͖ΔΑ͏͢Δػೳ
ɺػೳAΛ୲͢ΔͶ ͡Ό͋ɺػೳB ػೳAϒϥϯν ػೳBϒϥϯν ϕʔεϒϥϯν
ϒϥϯνΛ࡞Δ͜ͱͰɺͦΕͧΕ͕࡞ۀͰ͖Δͷ͔͚ͬͨͲɺ Ͳ͏ͬͯ̍ͭʹ·ͱΊΔͷʁ ͦΕɺϚʔδ(merge)Λ͏ΜͩΑ
ػೳA͕ग़དྷͨ ͕ࠩେ͖͘ͳΔલʹɺ มߋΛऔΓࠐΜͰ͓͜͏ Ϛʔδ Ϛʔδ ϕʔεϒϥϯν
ϚʔδΛߦ͏ͱଞͷਓͷมߋ͕औΓࠐΊΔΜͩͶ Ͱɺಉ͡ϑΝΠϧΛมߋ͍ͯͨ͠߹ɺ ίϯϑϦΫτ(িಥ)͕ൃੜ͢Δ͜ͱ͕͋ΔΑ ͦΜͳ࣌ɺͲ͏͢Δͷʁ ؤுͬͯɺ͍͍ײ͡ʹࠩΛऔΓࠐΉʂ ͑ͬʁ ؤுΔʂʂ
มߋΛૹΓ߹͏ͷɺͲ͏͢Ε͍͍ͷʁ GitΛϗεςΟϯά͍ͯ͠ΔαʔϏεΛར༻͠Α͏ ϗεςΟϯά͍ͯ͠ΔαʔϏεʁ GitHubGitL a bͳͲ͕༗໊ͩΑ
Push Pull
ͦ͏͍͑ɺϕʔεϒϥϯνʹউखʹϚʔδ͍͍ͯ͠ͷʁ ίʔυϨϏϡʔΛड͚͔ͯΒɺϚʔδΛߦ͏Ͷ Ͳ͏ͬͯίʔυϨϏϡʔΛड͚Δͷʁ GitHubͰPull Requestɺ GitL a bͰMerge Request ͱ͍ͬͨػೳΛ͓͏
ػೳA͕ग़དྷͨͷͰɺPull RequestΛ࡞Γ·ͨ͠ ϨϏϡʔΛ͓ئ͍͠·͢ ྃղͰ͢ ͋Γ͕ͱ͏͍͟͝·͢ɻ ͡Ό͋Pull RequestΛϕʔεϒϥϯνʹϚʔδ͠·͢ Pull RequestΛݟ·ͨ͠ɻOKͰ͢
Pull RequestͬͯɺͲͷ͘Β͍ͷཻͰߦ͏ͱ͍͍ͷʁ Ұ֓ʹ͍͑ͳ͍͚Ͳɺ200 ~ 300ߦ·Ͱ͙Β͍ʹ͍͑ͨͶ Ͳ͏ͯ͠ʁ มߋ͕ଟ͘ͳΔ΄ͲɺίʔυϨϏϡʔͷෛ୲͕େ͖͘ͳΔ͔ΒͶ
ϑΝΠϧA ϑΝΠϧB ϑΝΠϧC ϑΝΠϧD ػೳA ػೳB ػೳC Λ࣮ͨ͠ͷͰɺϨϏϡʔΛ͓ئ͍ ͲͷϑΝΠϧʹɺͲͷػೳ͕͍ؔͯ͠ΔΜͩʁ
ϑΝΠϧA ػೳA Λ࣮ͨ͠ͷͰɺϨϏϡʔΛ͓ئ͍ Pull Requestʹ࠷ݶͷมߋͷΈͳͷͰݟ͍͢ʂ ϑΝΠϧB ϑΝΠϧC ࣍ʹػೳB Λ࣮ͨ͠ͷͰɺϨϏϡʔΛ͓ئ͍ ϑΝΠϧA
ϑΝΠϧC ϑΝΠϧD
ࡉ͔͍Pull RequestΛ࡞Δίπʁ 1ͭͷػೳΛࡉ͔ͳػೳʹׂͰ͖Δ͔ߟ͑Α͏ ͨͱ͑ɺʮCSVʹ͋Δࣈͷܭࢉ݁ՌΛอଘ͢ΔʯػೳΛ͚Δͱ 1. CSV͔ΒࣈΛಡΈࠐΉ 2. ܭࢉΛߦ͏ 3. ݁ՌΛอଘ͢Δ
GitͬͯศརͰ͢Ͷʂ