×
Copy
Open
Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
git-daily #pyfes @sotarok http://strk.jp/ A tool supports a daily workflow with remote
Slide 2
Slide 2 text
ࣗݾհ
Slide 3
Slide 3 text
sotarok ͦ͏ͨΖ͏ (͚ʔ) Crocos, Inc. PHP Git Perfume capsule Red Bull (Congratulation on world champion!)
Slide 4
Slide 4 text
WEB+DB PRESS Vol.65 PHPಛू ୈ̍ষ ॻ͖·ͨ͠ 10/22 ൃച એͰͨ͠ɻ#pyfes ͚ͩͲ...
Slide 5
Slide 5 text
Git ?
Slide 6
Slide 6 text
Git ʹΑΔ։ൃ
Slide 7
Slide 7 text
Git ≠ ศརͳSubversion
Slide 8
Slide 8 text
GitʹΑΔ։ൃ: - Subversionʹ͓͚Δbranch? - (e.g. trunk, tags ...) - ϒϥϯνͷӡ༻ - ϦϦʔεϑϩʔ
Slide 9
Slide 9 text
A successful Git branching model http://nvie.com/posts/a-successful-git-branching-model/
Slide 10
Slide 10 text
gitflow ͗ͬͱ;Ζʔ
Slide 11
Slide 11 text
gitflow?
Slide 12
Slide 12 text
gitflow: ɹϒϥϯνӡ༻Ϟσϧͷ ɹϕετϓϥΫςΟε ɹͷͨΊͷ ɹGit Command Wrapper
Slide 13
Slide 13 text
IUUQOWJFDPNQPTUTBTVDDFTTGVMHJUCSBODIJOHNPEFM
Slide 14
Slide 14 text
ϒϥϯνӡ༻Ϟσϧ master: ϦϦʔε͞Ε͍ͯΔ࠷৽ͷιʔείʔυ develop: ։ൃ༻ϒϥϯν feature/xxx: ಛఆػೳxxx༻ϒϥϯν release/yyy: yyyϦϦʔε༻ϒϥϯν hotfix/zzz: masterϒϥϯνͷۓٸमਖ਼༻ϒϥϯν
Slide 15
Slide 15 text
$ git flow feature start hoge $ git checkout -b feature/hoge
Slide 16
Slide 16 text
$ git flow feature finish hoge $ git checkout develop $ git merge --no-ff feature/hoge $ git branch -d fearture/hoge
Slide 17
Slide 17 text
$ git flow release start 1.0 $ git checkout -b release/1.0
Slide 18
Slide 18 text
$ git flow release finish hoge $ git checkout master $ git merge --no-ff release/1.0 $ git tag -a 1.0 $ git checkout develop $ git merge --no-ff release/1.0 $ git branch -d release/1.0
Slide 19
Slide 19 text
gitflow: - ϥΠϒϥϦ(ͷΑ͏ͳͷ) ͷ։ൃʹ͍͍ͯΔ - release ࣌ɺtag ͕͚ͭΒΕΔ - remote ͱͷ࿈ܞ࡞ۀ΄΅ߟྀ͞Ε͍ͯͳ͍ Web ։ൃ Y gitflow = ϕετ?
Slide 20
Slide 20 text
Web։ൃͱ͔νʔϜ։ൃͱ͔: - ϥΠϒϥϦ(ͷΑ͏ͳͷ)ΑΓසൃ͢ΔϦϦʔε - ؾָʹϒϥϯνΓ͍ͨɺϦϦʔε͍ͨ͠ - remote ͱͷ࿈ܞ͕جຊ - Git ͚ͩͲ - தԝूݖαʔό͕͋ͬͨΓɻ͋ΔΑͶɻ - e.g. GitHub, gitosis
Slide 21
Slide 21 text
ॏཁͳͷ gitflow ͱ͍͏πʔϧͰͳ͍
Slide 22
Slide 22 text
A successful Git branching model http://nvie.com/posts/a-successful-git-branching-model/
Slide 23
Slide 23 text
IUUQOWJFDPNQPTUTBTVDDFTTGVMHJUCSBODIJOHNPEFM
Slide 24
Slide 24 text
ϒϥϯνӡ༻Ϟσϧ ࣗ༝͗͢ΔGitʹ ϒϥϯνͷʮӡ༻ϧʔϧʯΛͭ͘Γ ݱ࣮తͰ߹ཧతͳ GitΛ༻͍ͨ ։ൃͷϧʔϧΛఆΊΔͷ ͞·͟·ͳελΠϧͷ ։ൃʹԠ༻͕Մೳ
Slide 25
Slide 25 text
Git͕ࣗ༝͗͢Δྫ1 $ git pull origin develop local ͷ master ϒϥϯν remote ͷ develop ϒϥϯν͔Β pull
Slide 26
Slide 26 text
Git͕ࣗ༝͗͢Δྫ2 $ git push origin master develop ϒϥϯν͔Β remote ͷ master ϒϥϯνͷ push
Slide 27
Slide 27 text
൵ܶಥવͬͯ͘Δ DUSMS
Slide 28
Slide 28 text
ؓٳ
Slide 29
Slide 29 text
git-daily
Slide 30
Slide 30 text
/ /git-daily
Slide 31
Slide 31 text
git-daily: - gitflow ͷ branching model Λ࠾༻ - සͷߴ͍ϦϦʔε/ʑͷϦϦʔε - tag ͱ͔Βͳ͍ - remote ͱͷ࿈ܞ - push/pull - remote branch ࡞/আͷࣗಈԽ - release “sync”
Slide 32
Slide 32 text
git daily init - master, develop ϒϥϯν໊ͷܾఆ - ඪ४Ͱར༻͢Δ remote ໊Λܾఆ - default: origin - ઃఆ .git/config ʹ gitdaily ηΫγϣϯͰอଘ
Slide 33
Slide 33 text
git daily release open - ϦϦʔεϒϥϯν: release/yyyymmdd-hhMM - ϒϥϯν໊͔Βࣗಈੜ - open ޙʹ remote ʹ push
Slide 34
Slide 34 text
git daily release sync - remote ͱ sync - remote ʹ open ͞Εͨ release branch ͕͋Γɺࣗ ͷखݩʹແ͍߹ → औಘ͖ͯͯ͠ checkout - खݩʹ͋Δ → push / pull ͢Δ - remote ͷ release branch ͕ফ͑ͯͯखݩʹ͋Δ → खݩͷͭআ
Slide 35
Slide 35 text
git daily release close - ϦϦʔεϒϥϯνΛ master ʹ merge - master ϒϥϯνͷ push - ϦϦʔεϒϥϯνΛ develop ʹ merge - ͪΌΜͱ pull ͔ͯ͠Β merge - develop ϒϥϯνͷ push - remote ͷϦϦʔεϒϥϯνআ - local ͔Βআ
Slide 36
Slide 36 text
demo
Slide 37
Slide 37 text
Git ͷ Wrapperπʔϧ: - Gitࣗ༝͗͢Δ - ձࣾͰ͏ͳΒͦͷձࣾͰͷ։ൃελΠϧʹ͋Θ ͤͨ Wrapper πʔϧඞཁ - gitflow Λ͔ͭ͏Α͠ɺgit-dailyΛ͔ͭ͏Α ͠ɺࣗ࡞͢ΔΑ͠ - git-xxxx ͱ͍͏࣮ߦϑΝΠϧΛ $PATH ʹஔ͚ git ͷαϒίϚϯυ࡞Ε·͢
Slide 38
Slide 38 text
Wrapperπʔϧͷ: - Gitͷʮੜͷૢ࡞ʯ͕Ӆṭ͞ΕΔ - ͕ൃੜͨ͠ͱ͖ͷղܾํ๏ - CONFLICT - ͦ͏ݴͬͯ Git ͷࣝͪΖΜɺඞཁ - Կ͔͋ͬͨͱ͖ʹͲ͔͜Β࢝ΊΕྑ͍ͷ? - gitflow ͷ߹: - CONFLICT Λղফͨ͠Β·ͨ git flow release finish hoge Λଧͯྑ͍ (ຊ?)
Slide 39
Slide 39 text
git-daily: - ࣮ release ͔͠ରԠͯ͠ͳ͍ (͒ - hotfix ࣍ͷόʔδϣϯͰ - feature ͦͷ͏ͪ - ਖ਼ feature ͋Μ·Δ͜ͱͳ͍͔Β gitflow Ͱ͍͍Ͱ͢ - ซ༻ՄೳͰ͢ - ·͋࡞Δ͚Ͳ - test ॻ͍ͯΔ
Slide 40
Slide 40 text
git-daily: - ͍͍ͨํ͕͍ͨΒͥͻͥͻ - Feedback ͍͚ͨͩΔͱخ͍͠Ͱ͢ - Pull Request - Git ӡ༻ͷϕετϓϥΫςΟεڞ༗͠·͠ΐ͏
Slide 41
Slide 41 text
git-daily: PHP Ͱ͢ m9 - ͍͍ͨ͠ͱࢥͬͨΒੋඇ - ͝ΊΜ PHP ͳΜͩ Python ͩͱ ࢥͬͨ? PHP Ͱͨ͠
Slide 42
Slide 42 text
No content
Slide 43
Slide 43 text
Question?