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
Lightning Talk イベント運営を いいがにやりたい
kiyohara
0
7
首負担皆無!ゼログラビティ プログラミングスタイル
kiyohara
0
330
北陸で Ruby なお仕事に携わるための3つの戦略
kiyohara
1
1.6k
Algolia in CAMPFIRE
kiyohara
0
3.5k
地方エンジニアの日常 - 業務からコミュニティ活動まで
kiyohara
0
270
Web to macOS native app
kiyohara
0
360
金沢アプリ開発塾セミナー資料「テストについて」
kiyohara
1
240
Git インフラ選定事例 - 株式会社クルウィットが GitHub を選んだ理由
kiyohara
0
470
ベッドで技術書を快適に読むただひとつの方法
kiyohara
19
23k
Other Decks in Technology
See All in Technology
生成AIをより賢く エンジニアのための RAG入門 - Oracle AI Jam Session #20
kutsushitaneko
4
220
Storage Browser for Amazon S3
miu_crescent
1
140
バクラクのドキュメント解析技術と実データにおける課題 / layerx-ccc-winter-2024
shimacos
2
1k
日本版とグローバル版のモバイルアプリ統合の開発の裏側と今後の展望
miichan
1
130
TSKaigi 2024 の登壇から広がったコミュニティ活動について
tsukuha
0
160
OpenShift Virtualizationのネットワーク構成を真剣に考えてみた/OpenShift Virtualization's Network Configuration
tnk4on
0
130
生成AIのガバナンスの全体像と現実解
fnifni
1
180
サーバレスアプリ開発者向けアップデートをキャッチアップしてきた #AWSreInvent #regrowth_fuk
drumnistnakano
0
190
1等無人航空機操縦士一発試験 合格までの道のり ドローンミートアップ@大阪 2024/12/18
excdinc
0
150
OpenAIの蒸留機能(Model Distillation)を使用して運用中のLLMのコストを削減する取り組み
pharma_x_tech
4
550
MLOps の現場から
asei
6
630
re:Invent をおうちで楽しんでみた ~CloudWatch のオブザーバビリティ機能がスゴい!/ Enjoyed AWS re:Invent from Home and CloudWatch Observability Feature is Amazing!
yuj1osm
0
120
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
88
5.7k
Documentation Writing (for coders)
carmenintech
66
4.5k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Side Projects
sachag
452
42k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
5
440
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
A designer walks into a library…
pauljervisheath
204
24k
Raft: Consensus for Rubyists
vanstee
137
6.7k
Building Better People: How to give real-time feedback that sticks.
wjessup
365
19k
KATA
mclloyd
29
14k
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