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
310
北陸で Ruby なお仕事に携わるための3つの戦略
kiyohara
1
1.6k
Algolia in CAMPFIRE
kiyohara
0
3.4k
地方エンジニアの日常 - 業務からコミュニティ活動まで
kiyohara
0
260
Web to macOS native app
kiyohara
0
340
金沢アプリ開発塾セミナー資料「テストについて」
kiyohara
1
230
Git インフラ選定事例 - 株式会社クルウィットが GitHub を選んだ理由
kiyohara
0
470
ベッドで技術書を快適に読むただひとつの方法
kiyohara
19
23k
JavaScript で OS X を自動操作
kiyohara
1
470
Other Decks in Technology
See All in Technology
10分でわかるfreee エンジニア向け会社説明資料
freee
18
520k
新卒1年目が挑む!生成AI × マルチエージェントで実現する次世代オンボーディング / operation-ai-onboarding
cyberagentdevelopers
PRO
1
160
20241031_AWS_生成AIハッカソン_GenMuck
tsumita
0
110
GitHub Universe: Evaluating RAG apps in GitHub Actions
pamelafox
0
170
Figma Dev Modeで進化するデザインとエンジニアリングの協働 / figma-with-engineering
cyberagentdevelopers
PRO
1
430
プロダクトチームへのSystem Risk Records導入・運用事例の紹介/Introduction and Case Studies on Implementing and Operating System Risk Records for Product Teams
taddy_919
1
170
Automated Promptingを目指すその前に / Before we can aim for Automated Prompting
rkaga
0
110
Oracle Cloud Infrastructureデータベース・クラウド:各バージョンのサポート期間
oracle4engineer
PRO
27
12k
AIを駆使したゲーム開発戦略: 新設AI組織の取り組み / sge-ai-strategy
cyberagentdevelopers
PRO
1
130
最速最小からはじめるデータプロダクト / Data Product MVP
amaotone
5
730
マネジメント視点でのre:Invent参加 ~もしCEOがre:Inventに行ったら~
kojiasai
0
460
Autify Company Deck
autifyhq
1
39k
Featured
See All Featured
Building Your Own Lightsaber
phodgson
102
6k
Producing Creativity
orderedlist
PRO
341
39k
GraphQLとの向き合い方2022年版
quramy
43
13k
Being A Developer After 40
akosma
86
590k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
7
150
Optimising Largest Contentful Paint
csswizardry
33
2.9k
GitHub's CSS Performance
jonrohan
1030
460k
Product Roadmaps are Hard
iamctodd
PRO
48
10k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
43
6.6k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
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