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
Adopting Jetpack Compose in Your Existing Project - GDG DevFest Bangkok 2024
akexorcist
0
110
【Pycon mini 東海 2024】Google Colaboratoryで試すVLM
kazuhitotakahashi
2
550
OCI Security サービス 概要
oracle4engineer
PRO
0
6.5k
CysharpのOSS群から見るModern C#の現在地
neuecc
2
3.5k
IBC 2024 動画技術関連レポート / IBC 2024 Report
cyberagentdevelopers
PRO
1
120
SRE×AIOpsを始めよう!GuardDutyによるお手軽脅威検出
amixedcolor
0
190
Amazon CloudWatch Network Monitor のススメ
yuki_ink
1
210
Taming you application's environments
salaboy
0
200
障害対応指揮の意思決定と情報共有における価値観 / Waroom Meetup #2
arthur1
5
490
OCI Network Firewall 概要
oracle4engineer
PRO
0
4.2k
AIチャットボット開発への生成AI活用
ryomrt
0
170
FlutterアプリにおけるSLI/SLOを用いたユーザー体験の可視化と計測基盤構築
ostk0069
0
110
Featured
See All Featured
GitHub's CSS Performance
jonrohan
1030
460k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
840
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
0
110
Site-Speed That Sticks
csswizardry
0
31
Designing the Hi-DPI Web
ddemaree
280
34k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
Agile that works and the tools we love
rasmusluckow
327
21k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
Scaling GitHub
holman
458
140k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
Testing 201, or: Great Expectations
jmmastey
38
7.1k
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