Your SlideShare is downloading. ×
0
Open Source Collaboration  with Git and GitHub Alec Clews
Credit <ul><li>Based on presentation by Nick Quaranto http://xrl.us/benbdq </li></ul>
 
History
I'm an egoistical bastard, and I name all my projects after myself.  First Linux, now git. -Linus Torvalds
History <ul><li>BitKeeper debacle </li></ul><ul><li>Design Goals: </li></ul><ul><ul><li>CVS as an example of what  not  to...
 
And Now
1. Fast
Local 2. Local
The Staging Area
Distributed 3. Distributed
Local vs. Remote
4. Cheap Branching
Branching
Any Workflow 6.Many Workflows
Centralized
Integration Manager
Benevolent Dictator
Failboat. It’s not perfect.
The downsides <ul><li>Complexity </li></ul><ul><li>Windows FTL </li></ul><ul><li>What's an IDE? (but see egit for Eclipse,...
 
 
Now with git goodness as well
 
 
 
 
How to Contribute <ul><li>Fork a repository at GitHub  </li></ul><ul><li>Clone and connect your local repository  </li></u...
Demo
Hints and Tips <ul><li>Source git completions file via .bashrc to use git auto complete and branch name in prompt (kudos t...
Hints and Tips contd <ul><li>Use ‘ git update-index --stdin ’ as part of a pipe to add a lot files or filter files names (...
Example custom merge driver <ul><li>Define a new merge driver in .git/config </li></ul><ul><li>Define file patterns that u...
custom merge driver contd <ul><li>In .git/config </li></ul><ul><li>[merge &quot;overwrite&quot;] </li></ul><ul><li>name = ...
custom merge driver contd <ul><li>In .git/info/attributes </li></ul><ul><ul><li>NB No space around ‘=‘ </li></ul></ul><ul>...
git log <ul><li>http://git-scm.com </li></ul><ul><li>http://whygitisbetterthanx.com </li></ul><ul><li>http://delicious.com...
Upcoming SlideShare
Loading in...5
×

Collaboration With Git and GitHub

2,299

Published on

Presentation to Open Source Developers Club Mlebourne. 8/April/09

To be updated for Linux Users of Victoria Nov/09 presentation

Published in: Technology
0 Comments
6 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,299
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
60
Comments
0
Likes
6
Embeds 0
No embeds

No notes for slide

Transcript of "Collaboration With Git and GitHub"

  1. 1. Open Source Collaboration with Git and GitHub Alec Clews
  2. 2. Credit <ul><li>Based on presentation by Nick Quaranto http://xrl.us/benbdq </li></ul>
  3. 4. History
  4. 5. I'm an egoistical bastard, and I name all my projects after myself. First Linux, now git. -Linus Torvalds
  5. 6. History <ul><li>BitKeeper debacle </li></ul><ul><li>Design Goals: </li></ul><ul><ul><li>CVS as an example of what not to do </li></ul></ul><ul><ul><li>Distributed workflow </li></ul></ul><ul><ul><li>Strong safeguards against corruption </li></ul></ul><ul><ul><li>Very high performance </li></ul></ul><ul><li>In development since 2005 </li></ul>
  6. 8. And Now
  7. 9. 1. Fast
  8. 10. Local 2. Local
  9. 11. The Staging Area
  10. 12. Distributed 3. Distributed
  11. 13. Local vs. Remote
  12. 14. 4. Cheap Branching
  13. 15. Branching
  14. 16. Any Workflow 6.Many Workflows
  15. 17. Centralized
  16. 18. Integration Manager
  17. 19. Benevolent Dictator
  18. 20. Failboat. It’s not perfect.
  19. 21. The downsides <ul><li>Complexity </li></ul><ul><li>Windows FTL </li></ul><ul><li>What's an IDE? (but see egit for Eclipse, plus Vim and Emacs support, and GUIs)‏ </li></ul><ul><li>Still frequent releases </li></ul><ul><ul><li>Cygwin – build yourself </li></ul></ul><ul><ul><li>Ubuntu – use Git PPA </li></ul></ul>
  20. 24. Now with git goodness as well
  21. 29. How to Contribute <ul><li>Fork a repository at GitHub </li></ul><ul><li>Clone and connect your local repository </li></ul><ul><li>Write tests, implement functionality </li></ul><ul><li>Commit your local changes </li></ul><ul><li>Push your changes to your fork </li></ul><ul><li>Make a pull request </li></ul><ul><li>Profit!! </li></ul>
  22. 30. Demo
  23. 31. Hints and Tips <ul><li>Source git completions file via .bashrc to use git auto complete and branch name in prompt (kudos to Toby) </li></ul><ul><li>Set a global .gitignore file </li></ul><ul><li>git config --global merge.exludesfiles ~/.gitignore </li></ul><ul><li>Define a couple of global aliases for checkout and branch </li></ul>
  24. 32. Hints and Tips contd <ul><li>Use ‘ git update-index --stdin ’ as part of a pipe to add a lot files or filter files names (c.f. git add ) </li></ul><ul><li>Override global settings (e.g. email) in .git/config </li></ul><ul><li>Use ‘ git commit --allow-empty ’ to perform empty commit (rare corner case) </li></ul>
  25. 33. Example custom merge driver <ul><li>Define a new merge driver in .git/config </li></ul><ul><li>Define file patterns that use new merge driver </li></ul><ul><li>See gitattributes(5) </li></ul>
  26. 34. custom merge driver contd <ul><li>In .git/config </li></ul><ul><li>[merge &quot;overwrite&quot;] </li></ul><ul><li>name = overwrite using cp </li></ul><ul><li>driver = cp %B %A </li></ul><ul><li>#recursive = defaults to driver </li></ul>
  27. 35. custom merge driver contd <ul><li>In .git/info/attributes </li></ul><ul><ul><li>NB No space around ‘=‘ </li></ul></ul><ul><li>* merge=overwrite </li></ul>
  28. 36. git log <ul><li>http://git-scm.com </li></ul><ul><li>http://whygitisbetterthanx.com </li></ul><ul><li>http://delicious.com/alecclews/git </li></ul>
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×