Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.
Contributing to an Open
Source project on GitHub
Andy Waite
June 2012
Why contribute?
Learn a technology outside of your day job
Scratch an itch
Remove a blocker
Learn by peer review
Collabora...
What to contribute?
Fix a bug for a problem you’ve discovered
Add behaviour for a new feature you want
Resolve an issue re...
The old way
Mailing lists, FTP servers
diff oldFile newFile > mods.diff
patch < mods.diff
SourceForge
The new way
GitHub - founded in 2008
Now over 1.7 million users, 3 million repos
Code, issues, wiki, hosting, stats, socia...
Getting started
Create a GitHub account
Setup Git
Identify the original project (beware of forks)
Check for signs of life
Fork the original project
One click to fork into your account
andyw8/WidgetMagic → samfrench/WidgetMagic
Clones the full h...
Clone your fork locally
git clone git@github.com:samfrench/WidgetMagic.git
cd WidgetMagic
Run the test suite
Install the dependencies
Run the test suite
Common language conventions:
Ruby: rake
Java: mvn
Create a topic branch
Use one branch per topic (bug, feature, etc.)
git checkout -b allow-duplicate-widgets
Display the cu...
Commit your change
git add WidgetMagic.rb
git commit -m "Allow duplicate widgets"
Push to your remote repo
git push origin allow-duplicate-widgets
Create a pull request
Pull Request button appears on your repo
A pull request starts a conversation
It might not be accept...
Merging the pull request
Project maintainer merges your commits and closes
the pull request
GitHub sends you an notificatio...
Stay up-to-date
A few months later you want to contribute again
But changes to the original project don’t propogate
automa...
Social coding
Promote your contribution
Maintainers - thank your contributors
In summary
Start with the smallest contribution you can find, e.g.
fixing a typo
Share half-formed ideas. Code is better tha...
Prochain SlideShare
Chargement dans…5
×

Contributing to Open Source via GitHub

244 vues

Publié le

Contributing to Open Source via GitHub

Publié dans : Logiciels
  • Soyez le premier à commenter

  • Soyez le premier à aimer ceci

Contributing to Open Source via GitHub

  1. 1. Contributing to an Open Source project on GitHub Andy Waite June 2012
  2. 2. Why contribute? Learn a technology outside of your day job Scratch an itch Remove a blocker Learn by peer review Collaborate and share knowlege Promote yourself and get noticed Your portfolio is your CV Coderwall
  3. 3. What to contribute? Fix a bug for a problem you’ve discovered Add behaviour for a new feature you want Resolve an issue reported by someone else Improve the documentation (what confused you?) Expand the test coverage Provide a example
  4. 4. The old way Mailing lists, FTP servers diff oldFile newFile > mods.diff patch < mods.diff SourceForge
  5. 5. The new way GitHub - founded in 2008 Now over 1.7 million users, 3 million repos Code, issues, wiki, hosting, stats, social, API Major projects: Node, Rails, jQuery, Backbone, Linux Kernel, PHP, Zend 2, Symfony, Underscore, Git, Wordpress, Drupal Big companies: Google, Microsoft, Apple All free for public projects
  6. 6. Getting started Create a GitHub account Setup Git Identify the original project (beware of forks) Check for signs of life
  7. 7. Fork the original project One click to fork into your account andyw8/WidgetMagic → samfrench/WidgetMagic Clones the full history, branches, tags
  8. 8. Clone your fork locally git clone git@github.com:samfrench/WidgetMagic.git cd WidgetMagic
  9. 9. Run the test suite Install the dependencies Run the test suite Common language conventions: Ruby: rake Java: mvn
  10. 10. Create a topic branch Use one branch per topic (bug, feature, etc.) git checkout -b allow-duplicate-widgets Display the current branch in your shell prompt
  11. 11. Commit your change git add WidgetMagic.rb git commit -m "Allow duplicate widgets"
  12. 12. Push to your remote repo git push origin allow-duplicate-widgets
  13. 13. Create a pull request Pull Request button appears on your repo A pull request starts a conversation It might not be accepted right away Improve it and push the new commits
  14. 14. Merging the pull request Project maintainer merges your commits and closes the pull request GitHub sends you an notification Your contribution shows in the commit log
  15. 15. Stay up-to-date A few months later you want to contribute again But changes to the original project don’t propogate automatically so your fork becomes out-of-date git remote add upstream git:// github.com/andyw8/WidgetMagic.git git fetch upstream get merge upstream master
  16. 16. Social coding Promote your contribution Maintainers - thank your contributors
  17. 17. In summary Start with the smallest contribution you can find, e.g. fixing a typo Share half-formed ideas. Code is better than words. Start your own project!

×