Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Git and GitHub at the San Francisco JUG

Git and GitHub at the San Francisco JUG

Matthew McCullough of GitHub presented on why Java developers have so many reasons to explore Git and Git, including productivity gains, easy OSS contributions, the eGit Eclipse plugin, and JGit, the underlying Java cleanroom implementation that powers https://android.googlesource.com.

Matthew McCullough

June 09, 2012
Tweet

More Decks by Matthew McCullough

Other Decks in Programming

Transcript

  1. Why Java Devs Should Care About Git & GitHub at

    the San Francisco JUG by Matthew McCullough
  2. Git

  3. I'm an egotistical bastard, and I name all my projects

    after myself. First Linux, now git. -Linus Torvalds “ ”
  4. ➡How to commit, branch and tag ➡How Git implements a

    new commit-referencing syntax ➡How to pull and push changes between repositories ➡How to set up a Git repository
  5. ➡How to commit, branch and tag ➡How Git implements a

    new commit-referencing syntax ➡How to pull and push changes between repositories ➡How to set up a Git repository
  6. > git status # On branch master # Initial commit

    # Changes to be committed: # (use "git rm --cached <file>..." to unstage) # new file: myfile.txt
  7. > git commit -m”<MESSAGE>” [master (root-commit) 498cc44] My first commit

    1 files changed, 5 insertions(+), 0 deletions(-) create mode 100644 myfile.txt
  8. ➡How to commit, branch and tag ➡How Git implements a

    new commit-referencing syntax ➡How to pull and push changes between repositories ➡How to set up a Git repository
  9. tree tree: 7e8b1 web blob: 9ab16 index.html a10b3 tree blob:

    8d162 logo.jpg blob: 51d22 draw.js 7e8b1 commit tree: a10b3 parent: nil author: Fird committer: Matthew message: Major refactoring of the web content. c67db blob <html> <body></body> </html> 9ab16 blob //Some more javascript var renderSize 51d22 blob 7D 8D B3 7F BD 12 9F E9 7B 78 9D 3F 5C A6 72 CB 8d162
  10. tree tree: 7e8b1 web blob: 9ab16 index.html a10b3 tree blob:

    8d162 logo.jpg blob: 51d22 draw.js 7e8b1 commit tree: a10b3 parent: nil author: Fird committer: Matthew message: Major refactoring of the web content. c67db blob <html> <body></body> </html> 9ab16 blob //Some more javascript var renderSize 51d22 blob 7D 8D B3 7F BD 12 9F E9 7B 78 9D 3F 5C A6 72 CB 8d162
  11. tree tree: 7e8b1 web blob: 9ab16 index.html a10b3 tree blob:

    8d162 logo.jpg blob: 51d22 draw.js 7e8b1 commit tree: a10b3 parent: nil author: Fird committer: Matthew message: Major refactoring of the web content. c67db blob <html> <body></body> </html> 9ab16 blob //Some more javascript var renderSize 51d22 blob 7D 8D B3 7F BD 12 9F E9 7B 78 9D 3F 5C A6 72 CB 8d162
  12. tree tree: 7e8b1 web blob: 9ab16 index.html a10b3 tree blob:

    8d162 logo.jpg blob: 51d22 draw.js 7e8b1 commit tree: a10b3 parent: nil author: Fird committer: Matthew message: Major refactoring of the web content. c67db blob <html> <body></body> </html> 9ab16 blob //Some more javascript var renderSize 51d22 blob 7D 8D B3 7F BD 12 9F E9 7B 78 9D 3F 5C A6 72 CB 8d162
  13. tree tree: 7e8b1 web blob: 9ab16 index.html a10b3 tree blob:

    8d162 logo.jpg blob: 51d22 draw.js 7e8b1 commit tree: a10b3 parent: nil author: Fird committer: Matthew message: Major refactoring of the web content. c67db blob <html> <body></body> </html> 9ab16 blob //Some more javascript var renderSize 51d22 blob 7D 8D B3 7F BD 12 9F E9 7B 78 9D 3F 5C A6 72 CB 8d162
  14. tree tree: 7e8b1 web blob: 9ab16 index.html a10b3 tree blob:

    8d162 logo.jpg blob: 51d22 draw.js 7e8b1 commit tree: a10b3 parent: nil author: Fird committer: Matthew message: Major refactoring of the web content. c67db blob <html> <body></body> </html> 9ab16 blob //Some more javascript var renderSize 51d22 blob 7D 8D B3 7F BD 12 9F E9 7B 78 9D 3F 5C A6 72 CB 8d162
  15. tree tree: 7e8b1 web blob: 9ab16 index.html a10b3 tree blob:

    8d162 logo.jpg blob: 51d22 draw.js 7e8b1 commit tree: a10b3 parent: nil author: Fird committer: Matthew message: Major refactoring of the web content. c67db blob <html> <body></body> </html> 9ab16 blob //Some more javascript var renderSize 51d22 blob 7D 8D B3 7F BD 12 9F E9 7B 78 9D 3F 5C A6 72 CB 8d162
  16. tree tree: 7e8b1 web blob: 9ab16 index.html a10b3 tree blob:

    8d162 logo.jpg blob: 51d22 draw.js 7e8b1 commit tree: a10b3 parent: nil author: Fird committer: Matthew message: Major refactoring of the web content. c67db blob <html> <body></body> </html> 9ab16 blob //Some more javascript var renderSize 51d22 blob 7D 8D B3 7F BD 12 9F E9 7B 78 9D 3F 5C A6 72 CB 8d162
  17. tree tree: 7e8b1 web blob: 9ab16 index.html a10b3 tree blob:

    8d162 logo.jpg blob: 51d22 draw.js 7e8b1 commit tree: a10b3 parent: nil author: Fird committer: Matthew message: Major refactoring of the web content. c67db blob <html> <body></body> </html> 9ab16 blob //Some more javascript var renderSize 51d22 blob 7D 8D B3 7F BD 12 9F E9 7B 78 9D 3F 5C A6 72 CB 8d162
  18. v1 v2 v3 commit tree: 9a87b parent: nil author: Fird

    committer: Matthew message: Major refactoring of the Javascript rendering engine. c67db commit tree: b22c1 parent: c67db author: Tim committer: Fird message: Minor update to HTML 9bd21 commit tree: b22c1 parent: 9bd21 author: Johnny committer: Joe message: New language transations 1c2d7
  19. v1 v2 v3 commit tree: 9a87b parent: nil author: Fird

    committer: Matthew message: Major refactoring of the Javascript rendering engine. c67db commit tree: b22c1 parent: c67db author: Tim committer: Fird message: Minor update to HTML 9bd21 commit tree: b22c1 parent: 9bd21 author: Johnny committer: Joe message: New language transations 1c2d7
  20. v1 v2 v3 commit tree: 9a87b parent: nil author: Fird

    committer: Matthew message: Major refactoring of the Javascript rendering engine. c67db commit tree: b22c1 parent: c67db author: Tim committer: Fird message: Minor update to HTML 9bd21 commit tree: b22c1 parent: 9bd21 author: Johnny committer: Joe message: New language transations 1c2d7
  21. v1 v2 v3 commit tree: 9a87b parent: nil author: Fird

    committer: Matthew message: Major refactoring of the Javascript rendering engine. c67db commit tree: b22c1 parent: c67db author: Tim committer: Fird message: Minor update to HTML 9bd21 commit tree: b22c1 parent: 9bd21 author: Johnny committer: Joe message: New language transations 1c2d7
  22. v1 v2 v3 commit tree: 9a87b parent: nil author: Fird

    committer: Matthew message: Major refactoring of the Javascript rendering engine. c67db commit tree: b22c1 parent: c67db author: Tim committer: Fird message: Minor update to HTML 9bd21 commit tree: b22c1 parent: 9bd21 author: Johnny committer: Joe message: New language transations 1c2d7
  23. v1 v2 v3 commit tree: 9a87b parent: nil author: Fird

    committer: Matthew message: Major refactoring of the Javascript rendering engine. c67db commit tree: b22c1 parent: c67db author: Tim committer: Fird message: Minor update to HTML 9bd21 commit tree: b22c1 parent: 9bd21 author: Johnny committer: Joe message: New language transations 1c2d7
  24. v1 v2 v3 commit tree: 9a87b parent: nil author: Fird

    committer: Matthew message: Major refactoring of the Javascript rendering engine. c67db commit tree: b22c1 parent: c67db author: Tim committer: Fird message: Minor update to HTML 9bd21 commit tree: b22c1 parent: 9bd21 author: Johnny committer: Joe message: New language transations 1c2d7
  25. v1 v2 v3 commit tree: 9a87b parent: nil author: Fird

    committer: Matthew message: Major refactoring of the Javascript rendering engine. c67db commit tree: b22c1 parent: c67db author: Tim committer: Fird message: Minor update to HTML 9bd21 commit tree: b22c1 parent: 9bd21 author: Johnny committer: Joe message: New language transations 1c2d7
  26. > git log commit 0fc27c73dea82a0576c6cf262fb517d24e75a223 Author: Matthew McCullough <[email protected]> Date:

    Mon Oct 24 10:42:20 2013 +0300 Performance enhancement of calc engine commit 7d946e814233814b1780ed1035da271cbb37206d Author: Matthew McCullough <[email protected]> Date: Mon Oct 24 12:59:41 2013 +0300 Translation to Esperanto
  27. ➡How to commit, branch and tag ➡How Git implements a

    new commit-referencing syntax ➡How to pull and push changes between repositories ➡How to set up a Git repository
  28. > git clone http://this.com/myproj.git Cloning into myproj... remote: Counting objects:

    3871, done. remote: Compressing objects: 100% (73/73), done. remote: Total 3871 (delta 51), reused 3853 (delta 36) Receiving objects: 100% (3871/3871), 297.88 KiB | 35 KiB/s, done. Resolving deltas: 100% (51/51), done. > cd myproj
  29. > git push Counting objects: 16, done. Delta compression using

    up to 2 threads. Compressing objects: 100% (10/10), done. Writing objects: 100% (15/15), 1.37 KiB, done. Total 15 (delta 5), reused 0 (delta 0) To http://this.com/myproj.git 6128b94..7607971 master -> master
  30. > git pull Updating 474f43d..7607971 Fast-forward sample5.htm | 1 +

    1 files changed, 1 insertions(+), 0 deletions(-) create mode 100644 sample5.htm
  31. Why Java Devs Should Care About Git & GitHub at

    the San Francisco JUG by Matthew McCullough