SlideShare a Scribd company logo
Contributing to open
source using git
Sameeh Jubran, Sameeh@daynix.com
Open Source
Why contribute to open
source?
Why contribute to open source?
● Gain Programming Experience
● Give Back to the Community
● Build a Practical Resume
Overview
Overview
Git
repository
Maintainers
You
Open Source
project
We did some commits now
what?
Now we need to send them to the community
Before sending commits to
community
Before sending
commits to
community
A checklist
● Coding style (tabs vs spaces)
● Testing
● Clear commit messages
Coding style - it is a big deal!
● In many open source projects such as Linux there are scripts that auto
check the code and show error messages accordingly
● Code style include:
○ Indentation
○ Naming conventions: CamelCase, snake_case, strHungarianNotation ( IsEmpty, is_empty,
bIsEmpty)
○ Brackets
○ Comments ( /* */ , // )
○ Proper names
● You can find linux’s checkpatch script here:
https://github.com/torvalds/linux/blob/master/scripts/checkpatch.pl
Coding style - it is a big deal!
“Tabs are 8 characters, and thus indentations are also 8 characters. There are
heretic movements that try to make indentations 4 (or even 2!) characters deep,
and that is akin to trying to define the value of PI to be 3.”
This snippet was taken straight from the Linux kernel Coding style document, it
can be found here:
https://www.kernel.org/doc/Documentation/CodingStyle
Please note that at Daynix we prefer spaces!
Sending commits to
community
Two main models
Patches Pull requests
Two main models
Patches Pull requests
In both models there is a main repository
In both models there are maintainers which approve/reject changes to the
repository
Patches
Patches - What are they?
● A patch is a small file that indicates what was changed in a repository
● Each commit is transformed into one patch using the git format-patch
command
Patches
● Mainly uses mailing list
● Generated using “git format-patch”
● Sent using “git send-email”
Patches’ life cycle
Set of
commits
Creating a
patch/es
Sending to
mailing list
Getting
reviews
Applying the
patches
Patches - mailing list
Mails in the Linux mailing list
6497 messages in one week! (8/11 - 15 /11)
Patches - mailing list
Patches - Example
We have this commit
Patches - Example
Create a patch out of it
git format-patch
Patches - Example
The Patch
Patches - Example
Sending the patch
git send-email
Pull requests - What are
they?
● let you tell others about changes you've pushed to a GitHub repository. Once
a pull request is sent, interested parties can review the set of changes,
discuss potential modifications, and even push follow-up commits if
necessary
● When you file a pull request, all you’re doing is requesting that another
developer (the project maintainer) pulls a branch from your repository into
their repository
Pull requests
● The repository needs to be accessible ( Can be a downside )
● Generated and sent using “git request-pull”
● Github ( and other similar websites) mainly uses this methodology
Pull requests’ life cycle
Set of
commits
Pull request
Getting
reviews
Pulling the
changes
Pull requests
Summary
Patches
● Mainly uses mailing list
● Generated using “git
format-patch”
● Sent using “git send-email”
Pull requests
● The repository needs to be
accessible
● Generated and sent using
“request-pull”
● Github mainly uses this
methodology
Q&A

More Related Content

PDF
Introduction to Git
PPTX
Git and github fundamentals
PDF
Git & github
PDF
Formation git
KEY
Intro to git
PDF
Git - The Incomplete Introduction
PDF
Intro to Git
PPTX
Git basics
Introduction to Git
Git and github fundamentals
Git & github
Formation git
Intro to git
Git - The Incomplete Introduction
Intro to Git
Git basics

What's hot (20)

PPTX
Git in 10 minutes
PPTX
Git presentation
PDF
Git: a tool for wizards
PPTX
PDF
Introduction to Git
PPTX
Git kelvin
PDF
Do You Get Git?
PPTX
Open source
PPTX
Git commands
PDF
Getting started With GIT
PPTX
You can git
ODP
Git: Git'ing the Basic
PPTX
Extra bit with git
PDF
Git tutorial
PDF
Introduction To Git
PPTX
Git from the trenches
PPTX
Git overview
PPTX
Git 101
PDF
A Practical Introduction to git
PPTX
Git hub
Git in 10 minutes
Git presentation
Git: a tool for wizards
Introduction to Git
Git kelvin
Do You Get Git?
Open source
Git commands
Getting started With GIT
You can git
Git: Git'ing the Basic
Extra bit with git
Git tutorial
Introduction To Git
Git from the trenches
Git overview
Git 101
A Practical Introduction to git
Git hub
Ad

Similar to Contributing to open source using Git (20)

ODP
Contributing to Upstream Open Source Projects
PPTX
Basics of Open Source Contribution - WWCodeMobile
PDF
How to contribute to large open source projects like Docker (LinuxCon 2015)
PDF
Git best practices 2016
PDF
O'Leary - Using GitHub for Enterprise and Open Source Documentation
PDF
Contributing-to-Open-Source-Projects-as-an-Absolute-Beginner.pdf
PDF
Contributing to Open Source via GitHub
PDF
Getting Git Right
PPTX
Hacktoberfest 2020 - Open source for beginners
PDF
Let's talk FOSS!
PDF
SFO15-TR2: Upstreaming 101
PDF
git and github
PDF
Git sourcecontrolpreso
PDF
XPDDS17: Contributing to Xen
PDF
Yes, you can git!
PDF
Switching to Git
PPTX
Ultimate Git Workflow - Seoul 2015
PPTX
Commitmas 2015
PDF
PPTX
Understanding Github and Version Control System.pptx
Contributing to Upstream Open Source Projects
Basics of Open Source Contribution - WWCodeMobile
How to contribute to large open source projects like Docker (LinuxCon 2015)
Git best practices 2016
O'Leary - Using GitHub for Enterprise and Open Source Documentation
Contributing-to-Open-Source-Projects-as-an-Absolute-Beginner.pdf
Contributing to Open Source via GitHub
Getting Git Right
Hacktoberfest 2020 - Open source for beginners
Let's talk FOSS!
SFO15-TR2: Upstreaming 101
git and github
Git sourcecontrolpreso
XPDDS17: Contributing to Xen
Yes, you can git!
Switching to Git
Ultimate Git Workflow - Seoul 2015
Commitmas 2015
Understanding Github and Version Control System.pptx
Ad

More from Yan Vugenfirer (13)

PDF
HCK-CI: Enabling CI for Windows Guest Paravirtualized Drivers - Kostiantyn Ko...
PDF
Receive side scaling (RSS) with eBPF in QEMU and virtio-net
PDF
Implementing SR-IOv failover for Windows guests during live migration
PDF
Qemu device prototyping
PDF
Windows network teaming
PDF
Rebuild presentation - IoT Israel MeetUp
PDF
Rebuild presentation during Docker's Birthday party
PDF
Microsoft Hardware Certification Kit (HCK) setup
PDF
UsbDk at a Glance 
PDF
Building “old” Windows drivers (XP, Vista, 2003 and 2008) with Visual Studio ...
PPTX
Advanced NDISTest options
PDF
QEMU Development and Testing Automation Using MS HCK - Anton Nayshtut and Yan...
PDF
Windows guest debugging presentation from KVM Forum 2012
HCK-CI: Enabling CI for Windows Guest Paravirtualized Drivers - Kostiantyn Ko...
Receive side scaling (RSS) with eBPF in QEMU and virtio-net
Implementing SR-IOv failover for Windows guests during live migration
Qemu device prototyping
Windows network teaming
Rebuild presentation - IoT Israel MeetUp
Rebuild presentation during Docker's Birthday party
Microsoft Hardware Certification Kit (HCK) setup
UsbDk at a Glance 
Building “old” Windows drivers (XP, Vista, 2003 and 2008) with Visual Studio ...
Advanced NDISTest options
QEMU Development and Testing Automation Using MS HCK - Anton Nayshtut and Yan...
Windows guest debugging presentation from KVM Forum 2012

Recently uploaded (20)

PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Cloud computing and distributed systems.
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PPT
Teaching material agriculture food technology
PDF
cuic standard and advanced reporting.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
NewMind AI Monthly Chronicles - July 2025
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Machine learning based COVID-19 study performance prediction
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
Unlocking AI with Model Context Protocol (MCP)
Cloud computing and distributed systems.
Advanced methodologies resolving dimensionality complications for autism neur...
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Teaching material agriculture food technology
cuic standard and advanced reporting.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Mobile App Security Testing_ A Comprehensive Guide.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
Dropbox Q2 2025 Financial Results & Investor Presentation
“AI and Expert System Decision Support & Business Intelligence Systems”
NewMind AI Monthly Chronicles - July 2025
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Machine learning based COVID-19 study performance prediction
The AUB Centre for AI in Media Proposal.docx
Reach Out and Touch Someone: Haptics and Empathic Computing

Contributing to open source using Git

  • 1. Contributing to open source using git Sameeh Jubran, Sameeh@daynix.com
  • 3. Why contribute to open source?
  • 4. Why contribute to open source? ● Gain Programming Experience ● Give Back to the Community ● Build a Practical Resume
  • 7. We did some commits now what? Now we need to send them to the community
  • 8. Before sending commits to community
  • 9. Before sending commits to community A checklist ● Coding style (tabs vs spaces) ● Testing ● Clear commit messages
  • 10. Coding style - it is a big deal! ● In many open source projects such as Linux there are scripts that auto check the code and show error messages accordingly ● Code style include: ○ Indentation ○ Naming conventions: CamelCase, snake_case, strHungarianNotation ( IsEmpty, is_empty, bIsEmpty) ○ Brackets ○ Comments ( /* */ , // ) ○ Proper names ● You can find linux’s checkpatch script here: https://github.com/torvalds/linux/blob/master/scripts/checkpatch.pl
  • 11. Coding style - it is a big deal! “Tabs are 8 characters, and thus indentations are also 8 characters. There are heretic movements that try to make indentations 4 (or even 2!) characters deep, and that is akin to trying to define the value of PI to be 3.” This snippet was taken straight from the Linux kernel Coding style document, it can be found here: https://www.kernel.org/doc/Documentation/CodingStyle Please note that at Daynix we prefer spaces!
  • 13. Two main models Patches Pull requests
  • 14. Two main models Patches Pull requests In both models there is a main repository In both models there are maintainers which approve/reject changes to the repository
  • 16. Patches - What are they? ● A patch is a small file that indicates what was changed in a repository ● Each commit is transformed into one patch using the git format-patch command
  • 17. Patches ● Mainly uses mailing list ● Generated using “git format-patch” ● Sent using “git send-email”
  • 18. Patches’ life cycle Set of commits Creating a patch/es Sending to mailing list Getting reviews Applying the patches
  • 19. Patches - mailing list Mails in the Linux mailing list 6497 messages in one week! (8/11 - 15 /11)
  • 21. Patches - Example We have this commit
  • 22. Patches - Example Create a patch out of it git format-patch
  • 24. Patches - Example Sending the patch git send-email
  • 25. Pull requests - What are they? ● let you tell others about changes you've pushed to a GitHub repository. Once a pull request is sent, interested parties can review the set of changes, discuss potential modifications, and even push follow-up commits if necessary ● When you file a pull request, all you’re doing is requesting that another developer (the project maintainer) pulls a branch from your repository into their repository
  • 26. Pull requests ● The repository needs to be accessible ( Can be a downside ) ● Generated and sent using “git request-pull” ● Github ( and other similar websites) mainly uses this methodology
  • 27. Pull requests’ life cycle Set of commits Pull request Getting reviews Pulling the changes
  • 29. Summary Patches ● Mainly uses mailing list ● Generated using “git format-patch” ● Sent using “git send-email” Pull requests ● The repository needs to be accessible ● Generated and sent using “request-pull” ● Github mainly uses this methodology
  • 30. Q&A