SlideShare a Scribd company logo
Getting Merged
All about social coding
Yo-An Lin
@c9s
Pull Request,
What's that? 什麼碗糕
The	
  old	
  school	
  open	
  source	
  
collaboration
以往的開源協作
...	
  are	
  done	
  by	
  patches	
  and	
  mailing	
  lists.
是靠 patch + mailing list 完
成的
sometimes	
  you	
  can	
  only	
  contact	
  the	
  
maintainer	
  with	
  an	
  e-­‐mail...
有時候你甚⾄至只有 e-mail
Getting merged
⼀一鍵寄出,⾳音訊全無
You	
  have	
  to	
  poke
戳戳樂,如果你很愛玩的話
無⽌止境合併衝突
The	
  new	
  age	
  of	
  open	
  source	
  
collaboration
新時代的開源協作
..	
  are	
  done	
  by	
  pull	
  requests
是靠 Pull Request 來完成的
Introduced by GitHub in 2008/2009
It	
  combines	
  review,	
  merge,	
  and	
  social
集檢閱, 合併, 社交於⼀一⾝身
One Click
Merge
It	
  reduces	
  the	
  cost	
  of	
  communication	
  &	
  
efforts
減少以往的溝通成本
How does it
work?
Pull Request
如何運作?
Getting merged
Getting merged
Getting merged
Getting merged
Getting merged
For what
reason? 發什麼 PR
"I	
  am	
  doing	
  +ine!	
  why	
  do	
  I	
  have	
  to	
  send	
  
the	
  PRs?!"
我好好的,發什麼 PR ?
http://wowquote.tw/quote/371
If	
  you	
  want	
  to	
  enrich	
  your	
  CV
您的 CV 很無聊嗎?
Then	
  you	
  should	
  send	
  PRs
那就送 PR 吧!
Do	
  you	
  want	
  to	
  claim	
  that	
  you're	
  the	
  
contributor	
  of	
  XXX	
  project?
你想要聲稱是某專案的貢獻
者
Then	
  you	
  should	
  send	
  PRs
那就送 PR 吧!
Seriously,
認真的說,
Once	
  you	
  merged	
  the	
  changes	
  to	
  
upstream
⼀一旦可以合併本地修改到上
游
1.	
  Reduces	
  the	
  cost	
  of	
  maintenance
1. 減少維護成本
2.	
  Helps	
  you	
  update	
  bug	
  Nixes	
  from	
  
upstream	
  without	
  pain
2. 無痛接收新的 BugFix
3.	
  Helps	
  you	
  avoid	
  merge	
  conNlicts	
  for	
  
the	
  future
3. 避免未來的修改衝突
4.	
  The	
  document	
  will	
  be	
  maintained
4. 還有⼈人持續幫你維護⽂文件
有這麼好康還說什麼
Rejected 駁回
Your	
  PR	
  might	
  be	
  rejected	
  if	
  ...
你的 PR 有可能會遭到駁回,
如果...
It	
  doesn't	
  match	
  the	
  direction	
  of	
  
the	
  project
與專案進⾏行⽅方向有衝突
It's	
  out	
  of	
  scope
或者超出範圍
It	
  will	
  break	
  the	
  compatibility
A Real World Case:
Getting merged
遭到駁回
The scientific ways to send
pull requests
RFC First 提案與回饋
Ask	
  First,	
  Shoot	
  later
問清楚,再動⼿手
先射後補也會讓⼈人尷尬
Nobody is
somebody 沒有⼈人就是你
"This	
  project	
  is	
  too	
  large!	
  What	
  
can	
  I	
  do?"
Anything	
  can	
  be	
  included	
  in	
  a	
  pull	
  
request
Build	
  system,	
  Documentation,	
  
Coding	
  style,	
  Designs,	
  Icons...	
  etc
Don't	
  limit	
  yourself
Start small 從⼩小處著⼿手
Small	
  things	
  usually	
  would	
  get	
  
merged	
  easily
Spaces,	
  Wordings,	
  Typos,	
  Small	
  
Nixes...	
  etc
https://twitter.com/jserv/status/552725130690826240
"That letter [the last s] is sad because all the others
have those things [=] below them and it does not."
This patch fixes the tragedy so all the letters can be
happy again.
Read The
Contribution
Document
Big	
  projects	
  have	
  their	
  own	
  coding	
  
rules	
  and	
  contribution	
  rules,	
  you	
  
have	
  to	
  read	
  them	
  carefully.
If	
  you're	
  not	
  doing	
  it	
  right	
  on	
  the	
  
coding	
  style,	
  you're	
  wasting	
  your	
  
time	
  to	
  get	
  merged.
For	
  example,	
  the	
  golang	
  team	
  asks	
  
you	
  to	
  run	
  `go	
  fmt`	
  when	
  
everytime	
  you	
  submit	
  a	
  patch
http://django-oauth-toolkit.readthedocs.org/en/latest/contributing.html
Divide and
Conquer 分⽽而治之
When	
  you	
  want	
  to	
  do	
  something	
  
big
You	
  should	
  divide	
  it	
  into	
  small	
  
separated	
  pull	
  requests
Good	
  impression	
  helps	
  a	
  lot
這是⼀一個
"最熟悉的陌⽣生⼈人"
的概念
Detail matters 細節
Busy	
  people	
  are	
  usually	
  too	
  busy	
  
to	
  listen,	
  think	
  or	
  understand	
  ...
A	
  good	
  brief	
  helps	
  reviewer	
  
quickly	
  understand	
  the	
  changes
BugFix	
  PR	
  should	
  contain	
  a	
  failing	
  
test	
  case	
  and	
  the	
  way	
  to	
  
reproduce	
  the	
  problem.
To	
  proof	
  it's	
  author's	
  fault
Or..	
  to	
  prevent	
  things	
  like	
  this...
Getting merged
At	
  least	
  it	
  prevents	
  from	
  the	
  time-­‐
consuming	
  communication
PR For Feature
• Objective
• Summary
• Effect (Or side effect)
• Tests
Safety 安全
Maintainers	
  usually	
  worry	
  about	
  
breaking	
  backward	
  compatibility,	
  
build	
  system,	
  dependencies...	
  etc
It's	
  also	
  important	
  to	
  get	
  
continuous	
  testing	
  pass
When	
  adding	
  new	
  features,	
  good	
  
tests	
  also	
  help	
  author	
  to	
  verify	
  the	
  
changes
Write	
  down	
  the	
  side	
  effects	
  to	
  
show	
  your	
  careful	
  thoughts	
  to	
  the	
  
author
Just Ask 問就對了
Asia	
  people	
  usually	
  are	
  too	
  shy	
  to	
  
ask	
  
Sometimes	
  people	
  just	
  don't	
  write	
  
down	
  their	
  concern	
  on	
  GitHub
有時專案作者很少會寫下⾃自
⼰己的⼼心中顧慮的部分
When	
  you	
  don't	
  get	
  reply,	
  you	
  
should	
  ask
"If	
  you	
  have	
  any	
  concern,	
  please	
  
let	
  me	
  know"	
  also	
  ping	
  them	
  back	
  
to	
  reply
Timezone
matters 時區有差
Human	
  beings	
  usually	
  check	
  their	
  
e-­‐mail	
  in	
  the	
  morning
For	
  company	
  sponsored	
  projects,	
  
people	
  usually	
  check	
  newly	
  
opened	
  issues	
  in	
  daylight.
For	
  just-­‐for-­‐fun	
  projects,	
  people	
  
usually	
  check	
  the	
  issues	
  in	
  night.
Some	
  non-­‐Asia	
  people	
  usually	
  
don't	
  check	
  e-­‐mail	
  or	
  work	
  on	
  
weekend
Don't	
  expect	
  their	
  e-­‐mail	
  on	
  the	
  
weekend
They	
  have	
  life!
Getting merged
And	
  for	
  Asia	
  
people,	
  you	
  can	
  
just	
  poke	
  around,	
  
they	
  will	
  reply	
  
you	
  all	
  day
San Francisco people get up at
01:00 AM Taipei Time (GMT+8)
And	
  they	
  get	
  off	
  work	
  at	
  10:00	
  
AM	
  Taipei	
  Time	
  (GMT+8)
People from London get up at 15:00
PM Taipei Time
They	
  are	
  having	
  their	
  lunch	
  while	
  
you're	
  having	
  dinner!
To	
  get	
  response	
  instantly
要得到快速回覆
You	
  should	
  send/reply	
  at	
  the	
  correct	
  
time
你應該在正確的時間點發信
And	
  you	
  shall	
  mostly	
  get	
  the	
  
response	
  quicker	
  then	
  you	
  
thought.
And	
  once	
  you	
  get	
  the	
  ping,	
  you	
  
have	
  to	
  pong	
  back	
  quickly
First	
  in,	
  First	
  out
Last	
  In,	
  Never	
  Out
Because	
  they've	
  got	
  off	
  work
The lines on this map show 12 cities’ typical working day, beginning with 9 AM on
the right and ending at 5 PM on the left, and each workday’s overlap with time
zones around the world. Each clock shows that city’s workday overlap with other
cities’ and the best time to schedule a call.
https://hbr.org/2010/10/vision-statement-why-mumbai-
at-1-pm-is-the-center-of-the-business-world
Timezone overlapping
World Clock app for multi-timezone
Countersign 連署
Votes	
  can	
  show	
  the	
  need	
  to	
  the	
  
author
Getting merged
Partnership 合作夥伴
By	
  being	
  reviewed	
  or	
  reviewing	
  
PRs	
  from	
  others	
  
you	
  will	
  know	
  good	
  people
Different	
  from	
  LinkedIn,
You	
  know	
  their	
  code	
  &	
  
personality
Negotiation 交涉
Screenshot
Rocks 有圖有真相
Screencast	
  even	
  better!
Getting merged
https://github.com/c9s/CLIFramework#automatic-zsh-completion-generator
LICEcap
https://github.com/lepht/licecap
Questions? 問題?
Getting merged

More Related Content

PDF
OSDC.TW 2014 building popular open source projects
PPTX
How to stop sucking and be awesome instead
PDF
I Wish I knew How to Quit You
PDF
Plone - A History of Python Web
PDF
/dev/fort: you can build it in a week @emw
PDF
Startups For Journalists
PDF
7 Reasons why web development is running in circles
PDF
The Plone is dead, long live the Plone!
OSDC.TW 2014 building popular open source projects
How to stop sucking and be awesome instead
I Wish I knew How to Quit You
Plone - A History of Python Web
/dev/fort: you can build it in a week @emw
Startups For Journalists
7 Reasons why web development is running in circles
The Plone is dead, long live the Plone!

Viewers also liked (20)

PDF
Globo.com - migração do player flash para html5
PPTX
XAML 入門
PPTX
LINQ の概要とかもろもろ
PPT
“なめらか”なメトロスタイルアプリを作るために ~WinRT の非同期性を活用したアプリ開発~
PPTX
LINQ概要
PPTX
WindowsストアーアプリでSharpDXを動かしてみる
PPTX
Windows ストアーアプリで SQLite を使ってみよう
PPTX
Why to choose laravel framework
PPTX
How to choose web framework
PDF
12-Step Program for Scaling Web Applications on PostgreSQL
PPTX
暗号通貨勉強会
PDF
Atomic Design powered by React @ AbemaTV
PPTX
簡単、クレカ決済! PAY.JPを使ったクレカ決済の仕組み・開発運用時の考慮点について
PDF
AWS Black Belt Techシリーズ AWS Management Console
PDF
AWS Black Belt Tech シリーズ 2015 - AWS WAF
PDF
Introduction to node.js by Ran Mizrahi @ Reversim Summit
PDF
Intro to JavaScript Testing
PDF
Dependency Injection @ AngularJS
PDF
AWS Black Belt Techシリーズ Amazon VPC
PDF
Starting a Collaboration Revolution
Globo.com - migração do player flash para html5
XAML 入門
LINQ の概要とかもろもろ
“なめらか”なメトロスタイルアプリを作るために ~WinRT の非同期性を活用したアプリ開発~
LINQ概要
WindowsストアーアプリでSharpDXを動かしてみる
Windows ストアーアプリで SQLite を使ってみよう
Why to choose laravel framework
How to choose web framework
12-Step Program for Scaling Web Applications on PostgreSQL
暗号通貨勉強会
Atomic Design powered by React @ AbemaTV
簡単、クレカ決済! PAY.JPを使ったクレカ決済の仕組み・開発運用時の考慮点について
AWS Black Belt Techシリーズ AWS Management Console
AWS Black Belt Tech シリーズ 2015 - AWS WAF
Introduction to node.js by Ran Mizrahi @ Reversim Summit
Intro to JavaScript Testing
Dependency Injection @ AngularJS
AWS Black Belt Techシリーズ Amazon VPC
Starting a Collaboration Revolution
Ad

Similar to Getting merged (15)

PDF
Learning Code Review & Commit Message with Google
PDF
O'Leary - Using GitHub for Enterprise and Open Source Documentation
PPTX
GitHub_Sharing_Session_2_GitHub_Sharing_Session.pptx
PPTX
Git Pull Requests
PDF
'Using' github - coworking with Github
PPTX
simple Git
PDF
git and github
PDF
Assign, commit, and review - A developer’s guide to OpenStack contribution-20...
PDF
Contributing to open source using Git
PDF
Contributing to Apache Airflow | Journey to becoming Airflow's leading contri...
PPTX
Tips and tricks for contributing to an Open Source project.pptx
PDF
簡單介紹git
PPTX
E caregitpresentation
PDF
Assign, Commit, and Review
PPTX
Understanding Github and Version Control System.pptx
Learning Code Review & Commit Message with Google
O'Leary - Using GitHub for Enterprise and Open Source Documentation
GitHub_Sharing_Session_2_GitHub_Sharing_Session.pptx
Git Pull Requests
'Using' github - coworking with Github
simple Git
git and github
Assign, commit, and review - A developer’s guide to OpenStack contribution-20...
Contributing to open source using Git
Contributing to Apache Airflow | Journey to becoming Airflow's leading contri...
Tips and tricks for contributing to an Open Source project.pptx
簡單介紹git
E caregitpresentation
Assign, Commit, and Review
Understanding Github and Version Control System.pptx
Ad

More from Lin Yo-An (12)

PDF
Code Generation in PHP - PHPConf 2015
PDF
OSDC.TW - Gutscript for PHP haters
PDF
Happy Go Programming
PDF
Happy Go Programming Part 1
PDF
Secret sauce of building php applications
PDF
LazyRecord: The Fast ORM for PHP
PDF
Vim Script Programming
PDF
CPAN 模組二三事
PDF
Vim Hacks (OSSF)
PDF
Perl.Hacks.On.Vim Perlchina
PDF
Perl.Hacks.On.Vim
PDF
Vim Hacks
Code Generation in PHP - PHPConf 2015
OSDC.TW - Gutscript for PHP haters
Happy Go Programming
Happy Go Programming Part 1
Secret sauce of building php applications
LazyRecord: The Fast ORM for PHP
Vim Script Programming
CPAN 模組二三事
Vim Hacks (OSSF)
Perl.Hacks.On.Vim Perlchina
Perl.Hacks.On.Vim
Vim Hacks

Recently uploaded (20)

PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Modernizing your data center with Dell and AMD
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPT
Teaching material agriculture food technology
PPTX
A Presentation on Artificial Intelligence
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
NewMind AI Monthly Chronicles - July 2025
PPTX
Cloud computing and distributed systems.
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
“AI and Expert System Decision Support & Business Intelligence Systems”
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
The AUB Centre for AI in Media Proposal.docx
Modernizing your data center with Dell and AMD
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Digital-Transformation-Roadmap-for-Companies.pptx
NewMind AI Weekly Chronicles - August'25 Week I
Dropbox Q2 2025 Financial Results & Investor Presentation
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Teaching material agriculture food technology
A Presentation on Artificial Intelligence
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
NewMind AI Monthly Chronicles - July 2025
Cloud computing and distributed systems.
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing

Getting merged