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
こわくないプルリク
Search
Tomokazu Kiyohara
June 15, 2013
Technology
1
58
こわくないプルリク
Github の Pull Request にフォーカスした Overview.
kanazawa.rb meetup 10 発表資料。
Tomokazu Kiyohara
June 15, 2013
Tweet
Share
More Decks by Tomokazu Kiyohara
See All by Tomokazu Kiyohara
首負担皆無!ゼログラビティ プログラミングスタイル
kiyohara
0
320
北陸で Ruby なお仕事に携わるための3つの戦略
kiyohara
1
1.6k
Algolia in CAMPFIRE
kiyohara
0
3.5k
地方エンジニアの日常 - 業務からコミュニティ活動まで
kiyohara
0
260
Web to macOS native app
kiyohara
0
350
金沢アプリ開発塾セミナー資料「テストについて」
kiyohara
1
240
Git インフラ選定事例 - 株式会社クルウィットが GitHub を選んだ理由
kiyohara
0
470
ベッドで技術書を快適に読むただひとつの方法
kiyohara
19
23k
JavaScript で OS X を自動操作
kiyohara
1
470
Other Decks in Technology
See All in Technology
Oracle Cloud Infrastructureデータベース・クラウド:各バージョンのサポート期間
oracle4engineer
PRO
28
12k
Amazon Personalizeのレコメンドシステム構築、実際何するの?〜大体10分で具体的なイメージをつかむ〜
kniino
1
100
Platform Engineering for Software Developers and Architects
syntasso
1
510
Terraform CI/CD パイプラインにおける AWS CodeCommit の代替手段
hiyanger
1
240
マルチプロダクトな開発組織で 「開発生産性」に向き合うために試みたこと / Improving Multi-Product Dev Productivity
sugamasao
1
300
これまでの計測・開発・デプロイ方法全部見せます! / Findy ISUCON 2024-11-14
tohutohu
3
370
【Startup CTO of the Year 2024 / Audience Award】アセンド取締役CTO 丹羽健
niwatakeru
0
970
iOS/Androidで同じUI体験をネ イティブで作成する際に気をつ けたい落とし穴
fumiyasac0921
1
110
AWS Lambda のトラブルシュートをしていて思うこと
kazzpapa3
2
170
Engineer Career Talk
lycorp_recruit_jp
0
140
Evangelismo técnico: ¿qué, cómo y por qué?
trishagee
0
360
Why does continuous profiling matter to developers? #appdevelopercon
salaboy
0
180
Featured
See All Featured
Docker and Python
trallard
40
3.1k
Intergalactic Javascript Robots from Outer Space
tanoku
269
27k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.2k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Why Our Code Smells
bkeepers
PRO
334
57k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
840
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
Gamification - CAS2011
davidbonilla
80
5k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Become a Pro
speakerdeck
PRO
25
5k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
370
Transcript
͜Θ͘ͳ͍ϓϧϦΫ Pull Request is not afraid LBOB[BXBSC
Github http://github.com
Pull Request
Pull Request
ͳʹ͢Δͷʁ ࣗͷίʔυΛ औΓࠐΜͰΒ͏खଓ͖
͜Θ͍ͷʁ ໎Λ͔͚Δ Մೳੑ͕͋ΔͷͰ ͪΐͬͱͼͼΔ
͜Θ͍ͷʁ ͜Θ͘ͳ͍ ʢ໎ͷதΛΕʣ
Let's Start
ϧʔϧ • ذݩ͕ಉ͡ϒϥϯνͲ͏͠Ͱ͑Δ • Ҏ্
Fork ʁ Fork ඞਢͰͳ͍ Ή͠ΖҰਓͰͰ͖Δ
master work A A B 1. checkout -b work 2.
commit
A A B Ϛʔδͯ͠ master work 1. checkout -b work
2. commit
A A B ͍͍Α B 3. merge master work 1.
checkout -b work 2. commit
Shared Repository Model • ڞ༻ϦϙδτϦͰར༻ • Collaborators • Organizations
A B B A B 4. push A 1. clone
5. merge master work 2. checkout -b work 3. commit
Fork & Pull Model • User ؒͰར༻
A B A 1. fork B A B A 6.
pull master work master 5. push 2. clone 3. checkout -b work 4. commit
Send Pull Request
Send Pull Request
Send Pull Request
Send Pull Request
Receive Pull Request
Receive Pull Request
Merge Pull Request
Merge Pull Request
·ͬͨ͘؆୯ͩ
໎ύλʔϯ
໎ύλʔϯ • Pull Request ޙͷίϛοτ • ίϯϑϦΫτ • େྔͷίϛοτ
Pull Request ޙͷίϛοτ • Pull Request ͷରϒϥϯν • ΫϩʔζલʹՃίϛοτ͢Δͱ •
Pull Request ͷରʹؚ·Εͯ͠·͏ • Pull Request ઌʹ Notification ͕ඈͿ • ίʔυϨϏϡʔˍमਖ਼өͷ༻్ʹରԠ͢ΔͨΊ
A B A B 4. push A 1. clone master
work 2. checkout -b work 3. commit
A B A B 4. push A 1. clone master
work 2. checkout -b work 3. commit C C D D 5. commit 7. commit 6. push 8. push
Pull Request ޙͷίϛοτ • ίʔυϨϏϡʔత • ·ͬͨ͘ͳ͍ར༻๏ • ผػೳͷ։ൃత •
ͷ͋Δʢ໎ͳʣར༻๏ • ผϒϥϯνͰ࡞ۀΛ͢Δ͜ͱͰղܾ
ίϯϑϦΫτ • ݩιʔεͷมߋʹै͍ͯ͠ͳ͍ͱൃੜ͢Δ • ͜·Ίͳ pull & rebase Ͱղܾ
A B X A B 4. push A 1. clone
5. merge master work 2. checkout -b work 3. commit commit
B master A B' X A 6. push 1. clone
7. merge master work 2. checkout -b work 3. commit B' B' X 4. pull A commit X 5. rebase
A X A 1. fork B A B A 6.
pull master work master 5. push 2. clone 3. checkout -b work 4. commit commit
B 5. rebase master A X A 1. fork B'
A X A 8. pull master work master 7. push 2. clone 3. checkout -b work 4. commit commit B' X 5. pull B'
B 5. rebase master A X A 1. fork B'
A X A 8. pull master work master 7. push 2. clone 3. checkout -b work 4. commit commit B' X 5. pull B'
Tips : Fork ݩ͔Β pull 1. git remote add upstream
https://github.com/<org>/<rep>.git 2. git checkout master 3. git pull upstream master
B 5. rebase master A X A 1. fork B'
A X A 8. pull master work master 7. push 2. clone 3. checkout -b work 4. commit commit B' X 5. pull B'
Tips : rebase ? merge ? • merge Ͱͳ͘ rebase
• ޙड़ͷίϛοτͷूΛ࣮ݱ͢ΔͨΊ • rebase લʹϒϥϯνΛ push ͍ͯͨ͠߹ • rebase ޙʹ push ͢Δࡍ -f Φϓγϣϯ͕ඞཁ • rebase ͷޭࡑ͋Γ merge ͍Δ • ίϛοτͷू͠ͳ͍ӡ༻
େྔͷίϛοτ • ίϛοτ͕େྔʹ͋Δ Pull Request • ίʔσΟϯά࡞ۀ࣌ʹࡉ͔ʹίϛοτ͍ͯ͠Ε Α͋͘Δঢ়گ
A P A B 4. push A 1. clone 5.
merge master work 2. checkout -b work 3. commiiiiiiiiiiits B B B B B B B B B B B B B B P B B B B B B B B B B B B B B B P P P P P P P P P P P P P P P
େྔͷίϛοτ • Pull Request ઌͰͷίϛοτϩάංେԽ • ࠩΛ֬ೝ͢Δͷ͕ࠔʹͳΔ • rebase -i
Ͱ1ίϛοτʹ·ͱΊΔ͜ͱͰղܾ 1. git checkout work 2. git rebase -i master 3. pick, squash, squash, squash...
A A 5. push A 1. clone 6. merge master
work 3. commiiiiiiiiiiits B P' P' P P' 2. checkout -b work 4. rebase -i (squash)
Tips : Pull Request Branch • ࡞ۀ༻ϒϥϯνͷཤྺΛ͍ͨ͠߹ • Pull Request
ઐ༻ϒϥϯνΛ࡞͢Δ 1. git checkout work 2. git checkout -b pr-work 3. git rebase -i master 4. pick, squash, squash, squash...
Conclusion • Pull Request ා͘ͳ͍ • ػೳຖͷϒϥϯνϯά • ͜·Ίͳ pull
& rebase • ίϛοτͷूʢrebase -iʣ
Conclusion • Pull Request ා͘ͳ͍ • ػೳຖͷϒϥϯνϯά • ͜·Ίͳ pull
& rebase • ίϛοτͷूʢrebase -iʣ "ઈର" ͷϧʔϧͳ͍ ʢͳʹ͕͓͜Δ͔Ѳͯ͑͠Α͍ʣ
·ͣࣗͷϦϙδτϦͰ ϒϥϯν͑͞Ε͙͢ࢼͤΔʂ
Thank you Tomokazu Kiyohara http://github.com/kiyohara http://facebook.com/tomokazu.kiyohara
&YUSB • http://blog.qnyp.com/2013/05/28/pull-request-for-github-beginners/ • http://kik.xii.jp/archives/179 • http://d.hatena.ne.jp/hnw/20110528