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

Git and GitHub at YAPC:Asia

Git and GitHub at YAPC:Asia

Andy Delcambre

August 30, 2014
Tweet

More Decks by Andy Delcambre

Other Decks in Programming

Transcript

  1. Total source lines grouped by language: ! ruby: 316613 (98.99%)

    sh: 2268 (0.71%) ansic: 743 (0.23%) perl: 179 (0.06%) python: 31 (0.01%)
  2. $ git log commit b3f13c1 Author: Andy Delcambre Date: Thu

    Aug 28 08:29 2014 ! Commit 3 ! commit c79e797 Author: Andy Delcambre Date: Thu Aug 28 08:29 2014 ! Commit 2 ! commit 9a42679 Author: Andy Delcambre Date: Thu Aug 28 08:28 2014 ! Initial commit commit b3f13c1 Commit 3 commit c79e797 Commit 2 commit 9a42679 Initial commit HEAD
  3. $ git cat-file -p b3f13c1 tree 9e68447 parent c79e797 author

    Andy Delcambre 1409182168 committer Andy Delcambre 1409182168 ! Commit 3 commit b3f13c1 Commit 3 tree 9e68447 commit c79e797 Commit 2 Parent
  4. $ git cat-file -p 9e68447 100644 blob b465ded README.md commit

    b3f13c1 Commit 3 tree 9e68447 commit c79e797 Commit 2 Parent blob 9e68447 README.md
  5. $ git cat-file -p b465ded # Test ! A test

    repo, for YAPC:Asia. commit b3f13c1 Commit 3 tree 9e68447 commit c79e797 Commit 2 Parent blob 9e68447 README.md # Test ! A test repo, for YAPC:Asia.
  6. enzo $ git init --bare demo.git Initialized empty Git repo

    in /home/adelcambre/git/demo.git/ ! yt $ git remote add origin adelcambre@enzo:git/demo.git yt $ git push origin master Counting objects: 6, done. Delta compression using up to 8 threads. Compressing objects: 100% (2/2), done. Writing objects: 100% (6/6), 473 bytes, done. Total 6 (delta 0), reused 6 (delta 0) To adelcambre@enzo:git/demo.git * [new branch] master -> master ! yt $ git clone adelcambre@enzo:git/demo.git Cloning into 'demo'... remote: Counting objects: 6, done. remote: Compressing objects: 100% (2/2), done. remote: Total 6 (delta 0), reused 0 (delta 0) Receiving objects: 100% (6/6), done.
  7. yt $ git remote add -f origin [email protected]:adelcambre/demo.git Updating origin

    From github.com:adelcambre/demo * [new branch] master -> origin/master ! yt $ git push origin master Counting objects: 6, done. Delta compression using up to 8 threads. Compressing objects: 100% (2/2), done. Writing objects: 100% (6/6), 473 bytes, done. Total 6 (delta 0), reused 6 (delta 0) To https://github.com/adelcambre/demo.git * [new branch] master -> master
  8. repo = Grit::Repo.new(“grit.git”) ! repo.commits # => [#<Grit::Commit "e80bbd2ce67651aa18e57fb0b43618ad4baf7750">, #<Grit::Commit

    "91169e1f5fa4de2eaea3f176461f5dc784796769">, #<Grit::Commit "038af8c329ef7c1bae4568b98bd5c58510465493">, #<Grit::Commit "40d3057d09a7a4d61059bca9dca5ae698de58cbe">, #<Grit::Commit "4ea50f4754937bf19461af58ce3b3d24c77311d9">]
  9. Git

  10. Further Reading Git for Computer Scientists http://eagain.net/articles/git-for-computer-scientists/ My mom told

    me git doesn’t scale https://vimeo.com/64716825 How GitHub uses GitHub to build Github http://zachholman.com/talk/how-github-uses-github-to-build-github/