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
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
5
49k
Vueで Webコンポーネントを作って Reactで使う / 20241030-cloudsign-vuefes_after_night
bengo4com
4
2.5k
リンクアンドモチベーション ソフトウェアエンジニア向け紹介資料 / Introduction to Link and Motivation for Software Engineers
lmi
4
290k
話題のGraphRAG、その可能性と課題を理解する
hide212131
4
1.5k
ガチ勢によるPipeCD運用大全〜滑らかなCI/CDを添えて〜 / ai-pipecd-encyclopedia
cyberagentdevelopers
PRO
3
200
Figma Dev Modeで進化するデザインとエンジニアリングの協働 / figma-with-engineering
cyberagentdevelopers
PRO
1
430
Java x Spring Boot Warm up
kazu_kichi_67
2
490
20241031_AWS_生成AIハッカソン_GenMuck
tsumita
0
110
とあるユーザー企業におけるリスクベースで考えるセキュリティ業務のお話し
4su_para
3
320
Nix入門パラダイム編
asa1984
2
200
ガバメントクラウド単独利用方式におけるIaC活用
techniczna
3
270
GitHub Universe: Evaluating RAG apps in GitHub Actions
pamelafox
0
170
Featured
See All Featured
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
92
16k
A better future with KSS
kneath
238
17k
Producing Creativity
orderedlist
PRO
341
39k
[RailsConf 2023] Rails as a piece of cake
palkan
51
4.9k
Designing for Performance
lara
604
68k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
22k
Being A Developer After 40
akosma
86
590k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
4 Signs Your Business is Dying
shpigford
180
21k
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