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

チーム開発 @ GitHub

ayatk
December 02, 2017

チーム開発 @ GitHub

2017/12/01に行ったプロジェクト内でのGitHub講習会で使った資料

一部privateリポジトリもありますがなくても多分大丈夫です

ayatk

December 02, 2017
Tweet

More Decks by ayatk

Other Decks in Programming

Transcript

  1. Pull Requestʹॻ͘͜ͱ • λΠτϧ • ͳΜͷͨΊʹ͜ͷPRΛग़ͨ͠ͷ͔ • ʮ̋̋ͷͱ͖ʹ̋̋͢Δ໰୊Λमਖ਼ʯɺʮ̋̋ͷػೳΛ௥Ճʯ • આ໌

    • ۩ମతͳमਖ਼಺༰ • λΠτϧ͚ͩͰ͸ݴ͑ͳ͔ͬͨิ଍આ໌ • εΫϦʔϯγϣοτ • ؔ࿈͢ΔIssue • ࣮૷ͯͯ͠Θ͔Βͳ͔ͬͨͱ͜
  2. Git Flow • developϒϥϯν͔Β͸ featureϒϥϯνΛੜ΍ͤ Δ • featureϒϥϯνͰ৽ػೳ Λ௥Ճ͍ͯ͘͠ •

    ௥Ճ͠ऴ͑ͨΒdevelop ϒϥϯνʹPullRequestΛ ౤͛Δ http://nvie.com/posts/a-successful-git-branching-model/
  3. Git Flow • ϦϦʔε͕Ͱ͖Δঢ়ଶʹͳͬ ͨΒdevelopϒϥϯν͔Β releaseϒϥϯνΛ࡞ΓϦϦʔ ε࡞ۀΛߦ͏ • ϦϦʔε࡞ۀ͕ऴΘͬͨΒ masterϒϥϯνͱdevelopϒ

    ϥϯνʹϚʔδ • Ϛʔδͨ͠masterϒϥϯνʹ ͸όʔδϣϯ໊Λ͚ͭͨtagΛ ੾Δ http://nvie.com/posts/a-successful-git-branching-model/
  4. Git Flow • ΍͹͍όά͕͋ͬͯࠓ ͙͢मਖ਼͠ͳ͍ͱࢮ ͵ͬͯͱ͖͸ɺ masterϒϥϯν͔Β hotfixϒϥϯνΛ࡞Δ • मਖ਼͕ऴΘͬͨΒ

    developͱmasterʹ Ϛʔδͯ͠λάΛ੾Δ http://nvie.com/posts/a-successful-git-branching-model/
  5. GitHub Flow • GitHub Flowͷ੍໿ • masterʹ͋Δ΋ͷ͸ͳΜͰ΋σϓϩΠՄೳ(ͪΌΜͱಈ͔ͳ͖Ό͍͚ͳ͍) • master͔ΒfeatureΛੜ΍͢ͱ͖͸໊લΛઆ໌తͳ΋ͷʹ͢Δ͜ͱ(new- oauth2-scopesͱ͔)

    • masterʹϚʔδͰ͖Δͱײͨ͡ΓɺԿ͔ॿݴ͕ཉ͔ͬͨ͠Βmasterʹ޲͚ͯ PullRequestΛ౤͛Δ(·ͩϚʔδͰ͖ͳ͍ͱ͖͸[WIP]ͱ͚ͭΔͱΘ͔Γ΍ ͯ͘͢Α͍) • ϚʔδΛͨ͠Βͦͷϒϥϯν͸͙͢ফ͠ɺ࠶ར༻͠ͳ͍
  6. GitHub Flow • masterʹ͋Δ΋ͷ͸ͳΜͰ΋σϓϩΠՄೳ(ͪΌΜͱಈ͔ͳ͖Ό͍͚ͳ͍) • master͔ΒfeatureΛੜ΍͢ͱ͖͸ӳޠͷ໊લͰઆ໌తͳ΋ͷʹ͢Δ͜ͱ (new-oauth2-scopesͱ͔) • ܾͯࣗ͠෼ͷ໊લͷϒϥϯνΛ࡞Βͳ͍ •

    ͜ͷ2ͭͷ੍໿ʹؔͯ͠͸ͲΜͳϒϥϯνϞσϧΛ࢖ͬͯ΋ඞͣकΔ͜ͱ!
 (कΒͳ͍ͱ୭͕ԿΛ΍͍ͬͯΔͷ͔Θ͔Βͳ͘ͳͬͨΓͯ͠ɺ
 νʔϜ։ൃ͕೉͘͠ͳΔ)
  7. gitignoreͷॻ͖ํ • σΟϨΫτϦ • <σΟϨΫτϦ໊> / • ϫΠϧυΧʔυ • *

    (ΞελϦεΫ) ͰύλʔϯʹϚον͢Δ͢΂ͯͷϑΝΠϧ͕ আ֎͞ΕΔ • ֦ுࢠ • *.py, *.java
  8. ࣮ࡍʹॻ͘ͱ͜Μͳײ͡ # Windows thumbnail cache files Thumbs.db ehthumbs.db ehthumbs_vista.db #

    Dump file *.stackdump # Folder config file [Dd]esktop.ini # Recycle Bin used on file shares $RECYCLE.BIN/ # Windows Installer files *.cab *.msi
  9. Global gitignoreద༻ํ๏ • ίϚϯυ (ָͩ͠Φεεϝ) • git config --global core.excludesfile

    <.gitignore_globalͷpath> • ϑΝΠϧΛ௚઀͍͡Δ • User HomeσΟϨΫτϦʹ “.gitconfig”ͱ͍͏ϑΝΠϧ͕͋Δ ͷͰͦͷதʹҎԼͷΑ͏ʹॻ͚͹OK • [core]
 excludesfile = path/to/gitignore_global