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

Git道場 技 本日の課題、 テクニックの解説

Git道場 技 本日の課題、 テクニックの解説

Shinichiro OGAWA

April 22, 2012
Tweet

More Decks by Shinichiro OGAWA

Other Decks in Programming

Transcript

  1. ຊ೔ͷ୊ࡐ w /VNCFSTϑΝΠϧΛνʔϜͰฤू w ͋·Γָ͘͠ͳ͍͕ɺܕͳͷͰؤுΔ͜ͱ w νʔϜؒͰ͸ίϛοτ಺༰ʹؔ͢Δ૬ஊɺձ࿩Λ͋·Γ͠ͳ͍ ͜ͱ w (JUʹ͍ͭͯͷෆ໌఺͸νϡʔλʔ΁

    w QVTIͷλΠϛϯάʹؔͯ͠͸ࠂ஌ͯ͠΋Α͍ w ίϛοτͯ͠ϦϞʔτʹ্͛Δ͜ͱΛճ΄Ͳ܁Γฦ͢ w ಉ͡ਓ͕࿈ଓͯ͠ίϛοτ͸͠ͳ͍͜ͱ 12೥4݄22೔೔༵೔
  2. ຊ೔ͷ୊ࡐ w /VNCFSTϑΝΠϧΛνʔϜͰฤू w ͋·Γָ͘͠ͳ͍͕ɺܕͳͷͰؤுΔ͜ͱ w νʔϜؒͰ͸ίϛοτ಺༰ʹؔ͢Δ૬ஊɺձ࿩Λ͋·Γ͠ͳ͍ ͜ͱ w (JUʹ͍ͭͯͷෆ໌఺͸νϡʔλʔ΁

    w QVTIͷλΠϛϯάʹؔͯ͠͸ࠂ஌ͯ͠΋Α͍ w ίϛοτͯ͠ϦϞʔτʹ্͛Δ͜ͱΛճ΄Ͳ܁Γฦ͢ w ಉ͡ਓ͕࿈ଓͯ͠ίϛοτ͸͠ͳ͍͜ͱ w ૣ͘ίϛοτ͢Δͷ͕໨తͰ͸ͳ͍ͷͰɺযΒͣʹߦ͏͜ͱ 12೥4݄22೔೔༵೔
  3. /VNCFSTϑΝΠϧͷฤू w /VNCFSTϑΝΠϧ w ʙͷ਺஋͕ॻ͔ΕͨߦͷϑΝΠϧ w ίϛοτຖʹɺࣗ෼ͰબΜͩద౰ͳ਺஋ͷޙΖʹه߸Λ௥ Ճ࡟আ͢Δ w ίϯϑϦΫτ͠΍͍͢Α͏ʹͨ͠΄͏͕Α͍

    w ଞਓ͕௥Ճͨ͠ه߸Λ࡟আ͢ΔͳͲ w ίϛοτϝοηʔδʹɺ௥Ճͨ͠ه߸΍਺஋ʹؔ͢Δ৘ใ Λهࡌ͢Δ 12೥4݄22೔೔༵೔
  4. /VNCFSTϑΝΠϧͷฤू w /VNCFSTϑΝΠϧ w ʙͷ਺஋͕ॻ͔ΕͨߦͷϑΝΠϧ w ίϛοτຖʹɺࣗ෼ͰબΜͩద౰ͳ਺஋ͷޙΖʹه߸Λ௥ Ճ࡟আ͢Δ w ίϯϑϦΫτ͠΍͍͢Α͏ʹͨ͠΄͏͕Α͍

    w ଞਓ͕௥Ճͨ͠ه߸Λ࡟আ͢ΔͳͲ w ίϛοτϝοηʔδʹɺ௥Ճͨ͠ه߸΍਺஋ʹؔ͢Δ৘ใ Λهࡌ͢Δ w ίϛοτ಺༰ʹؔͯ͠͸ɺ͜ͷίϛοτϝοηʔδͰͷ Έ఻ୡՄೳͱ͢Δ 12೥4݄22೔೔༵೔
  5. ίϛοτͯ͠ϦϞʔτʹ ্͛Δͷճ܁Γฦ͢ w ܕΛ܁Γฦͯ͠ମʹ֮͑ࠐ·ͤΔ͜ͱ͕໨త w ճ ηοτ ܁Γฦͯ͠ํ๏ͱཁ఺Λ֮͑Δ w ྲྀΕΛ܁Γฦ͢͜ͱ͕ॏཁͰ͋ΔͷͰɺૣ͘΍Ε͹͍͍ͱ͍

    ͏΋ͷͰ͸ͳ͍͜ͱΛ͓֮͑ͯ͘͜ͱ w ࣗ෼ͷίϛοτ͕࿈ଓ͍ͯ͠Δ͜ͱ͸ɺ͜ͷಓ৔Ͱ͸ഊ๺ ͱ஌Δ͜ͱ 12೥4݄22೔೔༵೔
  6. ίϛοτͯ͠ϦϞʔτʹ ্͛Δͷճ܁Γฦ͢ w ܕΛ܁Γฦͯ͠ମʹ֮͑ࠐ·ͤΔ͜ͱ͕໨త w ճ ηοτ ܁Γฦͯ͠ํ๏ͱཁ఺Λ֮͑Δ w ྲྀΕΛ܁Γฦ͢͜ͱ͕ॏཁͰ͋ΔͷͰɺૣ͘΍Ε͹͍͍ͱ͍

    ͏΋ͷͰ͸ͳ͍͜ͱΛ͓֮͑ͯ͘͜ͱ w ࣗ෼ͷίϛοτ͕࿈ଓ͍ͯ͠Δ͜ͱ͸ɺ͜ͷಓ৔Ͱ͸ഊ๺ ͱ஌Δ͜ͱ w ͦͷͨΊHJUQVTIͷ੠͔͚͸ߦ͏΄͏͕ྑ͍ 12೥4݄22೔೔༵೔
  7. ίϛοτͯ͠ϦϞʔτʹ ্͛Δͷճ܁Γฦ͢ w ܕΛ܁Γฦͯ͠ମʹ֮͑ࠐ·ͤΔ͜ͱ͕໨త w ճ ηοτ ܁Γฦͯ͠ํ๏ͱཁ఺Λ֮͑Δ w ྲྀΕΛ܁Γฦ͢͜ͱ͕ॏཁͰ͋ΔͷͰɺૣ͘΍Ε͹͍͍ͱ͍

    ͏΋ͷͰ͸ͳ͍͜ͱΛ͓֮͑ͯ͘͜ͱ w ࣗ෼ͷίϛοτ͕࿈ଓ͍ͯ͠Δ͜ͱ͸ɺ͜ͷಓ৔Ͱ͸ഊ๺ ͱ஌Δ͜ͱ w ͦͷͨΊHJUQVTIͷ੠͔͚͸ߦ͏΄͏͕ྑ͍ w ίϛοτॱΛ͋Β͔͡ΊܾΊ͓͍ͯͯ΋ྑ͍ 12೥4݄22೔೔༵೔
  8. ίϛοτͯ͠ϦϞʔτʹ ্͛Δͷճ܁Γฦ͢ w ܕΛ܁Γฦͯ͠ମʹ֮͑ࠐ·ͤΔ͜ͱ͕໨త w ճ ηοτ ܁Γฦͯ͠ํ๏ͱཁ఺Λ֮͑Δ w ྲྀΕΛ܁Γฦ͢͜ͱ͕ॏཁͰ͋ΔͷͰɺૣ͘΍Ε͹͍͍ͱ͍

    ͏΋ͷͰ͸ͳ͍͜ͱΛ͓֮͑ͯ͘͜ͱ w ࣗ෼ͷίϛοτ͕࿈ଓ͍ͯ͠Δ͜ͱ͸ɺ͜ͷಓ৔Ͱ͸ഊ๺ ͱ஌Δ͜ͱ w ͦͷͨΊHJUQVTIͷ੠͔͚͸ߦ͏΄͏͕ྑ͍ w ίϛοτॱΛ͋Β͔͡ΊܾΊ͓͍ͯͯ΋ྑ͍ w ແཧ͸͠ͳ͍Ͱ΄͍͠ 12೥4݄22೔೔༵೔
  9. ϦϙδτϦ৘ใ w ϦϙδτϦ w IUUQHJUIVCDPNHJUEPKPUFBN99 w ฤू͢ΔϑΝΠϧ w /VNCFST w

    վߦίʔυ͸Y"Ͱ w HJUDMPOFHJU!HJUIVCDPNHJUEPKPUFBN99HJU 12೥4݄22೔೔༵೔
  10. ϦϙδτϦ৘ใ w ϦϙδτϦ w IUUQHJUIVCDPNHJUEPKPUFBN99 w ฤू͢ΔϑΝΠϧ w /VNCFST w

    վߦίʔυ͸Y"Ͱ w HJUDMPOFHJU!HJUIVCDPNHJUEPKPUFBN99HJU w Θ͔Βͳ͍͜ͱ͕͋Ε͹खΛ্͍͛ͯͩ͘͞ 12೥4݄22೔೔༵೔
  11. ϦϙδτϦ৘ใ w ϦϙδτϦ w IUUQHJUIVCDPNHJUEPKPUFBN99 w ฤू͢ΔϑΝΠϧ w /VNCFST w

    վߦίʔυ͸Y"Ͱ w HJUDMPOFHJU!HJUIVCDPNHJUEPKPUFBN99HJU w Θ͔Βͳ͍͜ͱ͕͋Ε͹खΛ্͍͛ͯͩ͘͞ w νϡʔλʔ͕޲͔͍·͢ 12೥4݄22೔೔༵೔
  12. ϦϙδτϦ৘ใ w ϦϙδτϦ w IUUQHJUIVCDPNHJUEPKPUFBN99 w ฤू͢ΔϑΝΠϧ w /VNCFST w

    վߦίʔυ͸Y"Ͱ w HJUDMPOFHJU!HJUIVCDPNHJUEPKPUFBN99HJU w Θ͔Βͳ͍͜ͱ͕͋Ε͹खΛ্͍͛ͯͩ͘͞ w νϡʔλʔ͕޲͔͍·͢ w ͳΜͰ΋ฉ͍͍ͯͩ͘͞ 12೥4݄22೔೔༵೔
  13. HJUDPNNJUHJUQVTI QVMMSFCBTFΛճ܁Γฦ͢ w ࠓ౓͸HJUQVMMSFCBTFͰϦϕʔε͢Δ͜ͱ w Ϛʔδ͸͠ͳ͍Α͏ʹ஫ҙ w ίϛοτ͕௚ྻʹฒ΂Δ͜ͱ͕໨త w ճ

    ηοτ ܁Γฦͯ͠ํ๏ͱཁ఺Λ֮͑Δ w Ϧϕʔε͢Δͱ͖ͷ஫ҙ఺ w HJUQVMMSFCBTF 12೥4݄22೔೔༵೔
  14. HJUDPNNJUHJUQVTI QVMMSFCBTFΛճ܁Γฦ͢ w ࠓ౓͸HJUQVMMSFCBTFͰϦϕʔε͢Δ͜ͱ w Ϛʔδ͸͠ͳ͍Α͏ʹ஫ҙ w ίϛοτ͕௚ྻʹฒ΂Δ͜ͱ͕໨త w ճ

    ηοτ ܁Γฦͯ͠ํ๏ͱཁ఺Λ֮͑Δ w Ϧϕʔε͢Δͱ͖ͷ஫ҙ఺ w HJUQVMMSFCBTF w ϑΝΠϧฤू 12೥4݄22೔೔༵೔
  15. HJUDPNNJUHJUQVTI QVMMSFCBTFΛճ܁Γฦ͢ w ࠓ౓͸HJUQVMMSFCBTFͰϦϕʔε͢Δ͜ͱ w Ϛʔδ͸͠ͳ͍Α͏ʹ஫ҙ w ίϛοτ͕௚ྻʹฒ΂Δ͜ͱ͕໨త w ճ

    ηοτ ܁Γฦͯ͠ํ๏ͱཁ఺Λ֮͑Δ w Ϧϕʔε͢Δͱ͖ͷ஫ҙ఺ w HJUQVMMSFCBTF w ϑΝΠϧฤू w HJUBEE/VNCFST 12೥4݄22೔೔༵೔
  16. HJUDPNNJUHJUQVTI QVMMSFCBTFΛճ܁Γฦ͢ w ࠓ౓͸HJUQVMMSFCBTFͰϦϕʔε͢Δ͜ͱ w Ϛʔδ͸͠ͳ͍Α͏ʹ஫ҙ w ίϛοτ͕௚ྻʹฒ΂Δ͜ͱ͕໨త w ճ

    ηοτ ܁Γฦͯ͠ํ๏ͱཁ఺Λ֮͑Δ w Ϧϕʔε͢Δͱ͖ͷ஫ҙ఺ w HJUQVMMSFCBTF w ϑΝΠϧฤू w HJUBEE/VNCFST w HJUSFCBTFDPOUJOVF 12೥4݄22೔೔༵೔
  17. ϦϙδτϦ৘ใ w ϦϙδτϦ͸ઌఔͱಉ͡ w IUUQHJUIVCDPNHJUEPKPUFBN99 w ฤू͢ΔϑΝΠϧ͸Ұ౓୭͔͕Ϧηοτ͍ͯͩ͘͠͞ w νʔϜ಺Ͱ૬ஊܾͯ͠Ί͍ͯͩ͘͞ w

    HJUDMPOFHJU!HJUIVCDPNHJUEPKPUFBN99HJU w Θ͔Βͳ͍͜ͱ͕͋Ε͹खΛ্͍͛ͯͩ͘͞ w ઌ΄Ͳͱಉ͡Α͏ʹνϡʔλʔ͕޲͔͍·͢ 12೥4݄22೔೔༵೔
  18. SFCBTFͱNFSHF w SFCBTF͸ίϛοτΛඃͤΔײ͡ POUP w NFSHF͸ίϛοτΛ౷߹͢Δ A B C D

    E F G H A B C D E F G H m m m m m 12೥4݄22೔೔༵೔
  19. HJUQVMMͩͱ w HJUQVMMͩͱϚʔδ͞ΕΔ w Ϛʔδίϛοτ͕ൃੜ͢Δ D A B C A

    B C ڞ௨ίϛοτ HJUQVMM 12೥4݄22೔೔༵೔
  20. HJUQVMMͩͱ w HJUQVMMͩͱϚʔδ͞ΕΔ w Ϛʔδίϛοτ͕ൃੜ͢Δ D A B C A

    B C ڞ௨ίϛοτ D HJUQVMM 12೥4݄22೔೔༵೔
  21. HJUQVMMͩͱ w HJUQVMMͩͱϚʔδ͞ΕΔ w Ϛʔδίϛοτ͕ൃੜ͢Δ D A B C A

    B C ڞ௨ίϛοτ D HJUQVMM E 12೥4݄22೔೔༵೔
  22. HJUQVMMͩͱ w HJUQVMMͩͱϚʔδ͞ΕΔ w Ϛʔδίϛοτ͕ൃੜ͢Δ D A B C A

    B C ڞ௨ίϛοτ D HJUQVMM E m 12೥4݄22೔೔༵೔
  23. HJUQVMMͩͱ w HJUQVMMͩͱϚʔδ͞ΕΔ w Ϛʔδίϛοτ͕ൃੜ͢Δ D A B C A

    B C ڞ௨ίϛοτ D HJUQVMM E m Ϛʔδ͞ΕΔ 12೥4݄22೔೔༵೔
  24. HJUQVMMSFCBTFͰ ίϯϑϦΫτͨ͠Β w ແ໊ϒϥϯν͕νΣοΫΞ΢τ͞Εͨঢ়ଶ ʹͳΔ w Ͳ͏͢Δ͔ w ϑΝΠϧΛฤू w

    HJUBEE/VNCFST w HJUSFCBTFDPOUJOVF w ίϛοτ͸͠ͳ͍͜ͱ 12೥4݄22೔೔༵೔
  25. NFSHF͔SFCBTF͔ w ͲͪΒ͕͍͍͔͸ঢ়گ࣍ୈ w ͲͪΒʹ΋ར఺͕͋Γܽ఺͕͋Δ w ॏཁͳͷ͸ͦΕΛ஌Δ͜ͱ w جຊతʹ͸SFCBTF͔ͯ͠ΒQVTI͕Α͍ w

    ଞਓ͕ίϛοτ͍ͯ͠Δ͜ͱΛҙࣝ͢Δ w ϒϥϯν࡞ۀ͸NFSHF͕Α͍ w ࣗ෼࡞ۀΛه࿥ͱͯ͠࢒ͨ͢Ί 12೥4݄22೔೔༵೔