$30 off During Our Annual Pro Sale. View Details »

Introduction to Git

Introduction to Git

My 1 hour intro to Git

Scott Chacon

November 25, 2011
Tweet

More Decks by Scott Chacon

Other Decks in Programming

Transcript

  1. Introduction to Git
    Scott Chacon

    View Slide

  2. Me

    View Slide

  3. Scott Chacon

    View Slide

  4. View Slide

  5. git-scm.com

    View Slide

  6. http://gitref.org

    View Slide

  7. http://progit.org

    View Slide

  8. http://progit.org

    View Slide

  9. View Slide

  10. @chacon
    twitter

    View Slide


  11. View Slide

  12. What is Git?

    View Slide

  13. Git is an open source,
    distributed version control
    system designed for speed
    and efficiency

    View Slide

  14. Git is an open source,
    distributed version control
    system designed for speed
    and efficiency

    View Slide

  15. git-scm.com

    View Slide

  16. Git is an open source,
    distributed version control
    system designed for speed
    and efficiency

    View Slide

  17. File
    Checkout
    Version Database
    Version 3
    Version 2
    Version 1
    Central VCS Server
    Computer A

    View Slide

  18. File
    Checkout
    Version Database
    Version 3
    Version 2
    Version 1
    Central VCS Server
    Computer A
    File
    Checkout
    Computer B

    View Slide

  19. Version Database
    Version 3
    Version 2
    Version 1
    Server Computer
    File
    Computer A
    Version Database
    Version 3
    Version 2
    Version 1
    File
    Computer B
    Version Database
    Version 3
    Version 2
    Version 1

    View Slide

  20. Fully Distributed

    View Slide

  21. (almost) everything is local

    View Slide

  22. which means

    View Slide

  23. which means
    everything is fast

    View Slide

  24. which means
    everything is fast
    every clone is a backup

    View Slide

  25. which means
    everything is fast
    every clone is a backup
    work offline

    View Slide

  26. No Network Needed

    View Slide

  27. No Network Needed
    Performing a diff

    View Slide

  28. No Network Needed
    Performing a diff
    Viewing file history

    View Slide

  29. No Network Needed
    Performing a diff
    Viewing file history
    Committing changes

    View Slide

  30. No Network Needed
    Performing a diff
    Viewing file history
    Committing changes
    Merging branches

    View Slide

  31. No Network Needed
    Performing a diff
    Viewing file history
    Committing changes
    Merging branches
    Obtaining other revisions of a file

    View Slide

  32. No Network Needed
    Performing a diff
    Viewing file history
    Committing changes
    Merging branches
    Obtaining other revisions of a file
    Switching branches

    View Slide

  33. No Network Needed
    Performing a diff
    Viewing file history
    Committing changes
    Merging branches
    Obtaining other revisions of a file
    Switching branches

    View Slide

  34. Immutable

    View Slide

  35. (almost) never removes data

    View Slide

  36. Snapshots, not Patches

    View Slide

  37. File Based
    Delta Storage

    View Slide

  38. #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    This is Scott's
    Hello project.
    Licensed under GPL.
    README.txt hello.c
    Commit
    A
    This is Scott's Hello
    project.
    Licensed under GPL.
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    README.txt
    hello.c
    hola.c

    View Slide

  39. #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    This is Scott's
    Hello project.
    Licensed under GPL.
    README.txt hello.c
    Commit
    A
    This is Scott's Hello
    project.
    Licensed under GPL.
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    README.txt
    hello.c
    hola.c

    View Slide

  40. #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    This is Scott's
    Hello project.
    Licensed under GPL.
    README.txt hello.c
    Commit
    A
    This is Scott's Hello
    project.
    Licensed under GPL.
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    README.txt
    hello.c
    hola.c

    View Slide

  41. #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    This is Scott's
    Hello project.
    Licensed under GPL.
    README.txt hello.c
    Commit
    A
    This is Scott's Hello
    project.
    Licensed under GPL.
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    README.txt
    hello.c
    hola.c
    #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    This is Scott's
    Hello project.
    Licensed under GPL.
    README.txt hello.c
    Commit
    A
    This is Scott's Hello
    project.
    Licensed under GPL.
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    - printf("Hola\n");
    + printf("Hola\n");
    Commit
    B
    README.txt
    hello.c
    hola.c

    View Slide

  42. #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    This is Scott's
    Hello project.
    Licensed under GPL.
    README.txt hello.c
    Commit
    A
    This is Scott's Hello
    project.
    Licensed under GPL.
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    - printf("Hola\n");
    + printf("Hola\n");
    Commit
    B
    README.txt
    hello.c
    hola.c

    View Slide

  43. #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    This is Scott's
    Hello project.
    Licensed under GPL.
    README.txt hello.c
    Commit
    A
    This is Scott's Hello
    project.
    Licensed under GPL.
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    - printf("Hola\n");
    + printf("Hola\n");
    Commit
    B
    README.txt
    hello.c
    hola.c

    View Slide

  44. #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    This is Scott's
    Hello project.
    Licensed under GPL.
    README.txt hello.c
    Commit
    A
    This is Scott's Hello
    project.
    Licensed under GPL.
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    - printf("Hola\n");
    + printf("Hola\n");
    Commit
    B
    README.txt
    hello.c
    hola.c
    hola.c

    View Slide

  45. #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    This is Scott's
    Hello project.
    Licensed under GPL.
    README.txt hola.c
    Commit
    A
    This is Scott's Hello
    project.
    Licensed under GPL.
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    - printf("Hola\n");
    + printf("Hola\n");
    Commit
    B
    Commit
    C
    README.txt
    hello.c
    hola.c (rename)

    View Slide

  46. #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    This is Scott's
    Hello project.
    Licensed under GPL.
    README.txt hola.c
    Commit
    A
    This is Scott's Hello
    project.
    Licensed under GPL.
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    - printf("Hola\n");
    + printf("Hola\n");
    Commit
    B
    Commit
    C
    README.txt
    hello.c
    hola.c (rename)

    View Slide

  47. #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    This is Scott's
    Hola project.
    Licensed under GPL.
    README.txt hola.c
    Commit
    A
    This is Scott's Hello
    project.
    Licensed under GPL.
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    - printf("Hola\n");
    + printf("Hola\n");
    Commit
    B
    Commit
    C
    -Hello
    +Hola
    Commit
    D
    README.txt
    hello.c
    hola.c (rename)
    (copy)
    #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    hello.c
    #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    This is Scott's
    Hello project.
    Licensed under GPL.
    README.txt hola.c
    Commit
    A
    This is Scott's Hello
    project.
    Licensed under GPL.
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    - printf("Hola\n");
    + printf("Hola\n");
    Commit
    B
    Commit
    C
    README.txt
    hello.c
    hola.c (rename)

    View Slide

  48. #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    This is Scott's
    Hola project.
    Licensed under GPL.
    README.txt hola.c
    Commit
    A
    This is Scott's Hello
    project.
    Licensed under GPL.
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    - printf("Hola\n");
    + printf("Hola\n");
    Commit
    B
    Commit
    C
    -Hello
    +Hola
    Commit
    D
    README.txt
    hello.c
    hola.c (rename)
    (copy)
    #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    hello.c
    #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    This is Scott's
    Hello project.
    Licensed under GPL.
    README.txt hola.c
    Commit
    A
    This is Scott's Hello
    project.
    Licensed under GPL.
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    - printf("Hola\n");
    + printf("Hola\n");
    Commit
    B
    Commit
    C
    README.txt
    hello.c
    hola.c (rename)

    View Slide

  49. #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    This is Scott's
    Hola project.
    Licensed under GPL.
    README.txt hola.c
    Commit
    A
    This is Scott's Hello
    project.
    Licensed under GPL.
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    - printf("Hola\n");
    + printf("Hola\n");
    Commit
    B
    Commit
    C
    -Hello
    +Hola
    Commit
    D
    README.txt
    hello.c
    hola.c (rename)
    (copy)
    #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    hello.c

    View Slide

  50. Git Snapshots

    View Slide

  51. #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    This is Scott's
    Hello project.
    Licensed under GPL.
    README.txt hello.c
    Commit
    A
    c3d README.txt
    f13 hello.c
    This is Scott's
    Hello project.
    Licensed under
    GPL.
    c3d
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    f13

    View Slide

  52. #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    This is Scott's
    Hello project.
    Licensed under GPL.
    README.txt hello.c
    This is Scott's
    Hello project.
    Licensed under
    GPL.
    c3d
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    f13
    CHECKSUM

    View Slide

  53. #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    This is Scott's
    Hello project.
    Licensed under GPL.
    README.txt hello.c
    This is Scott's
    Hello project.
    Licensed under
    GPL.
    c3d
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    f13
    CHECKSUM

    View Slide

  54. #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    This is Scott's
    Hello project.
    Licensed under GPL.
    README.txt hello.c
    Commit
    A
    c3d README.txt
    f13 hello.c
    This is Scott's
    Hello project.
    Licensed under
    GPL.
    c3d
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    f13

    View Slide

  55. #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    This is Scott's
    Hello project.
    Licensed under GPL.
    README.txt hello.c
    Commit
    A
    c3d README.txt
    f13 hello.c
    This is Scott's
    Hello project.
    Licensed under
    GPL.
    c3d
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    f13

    View Slide

  56. #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    This is Scott's
    Hello project.
    Licensed under GPL.
    README.txt hello.c
    Commit
    A
    c3d README.txt
    f13 hello.c
    This is Scott's
    Hello project.
    Licensed under
    GPL.
    c3d
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    f13

    View Slide

  57. #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    This is Scott's
    Hello project.
    Licensed under GPL.
    README.txt hello.c
    Commit
    A
    c3d README.txt
    f13 hello.c
    This is Scott's
    Hello project.
    Licensed under
    GPL.
    c3d
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    f13

    View Slide

  58. #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    This is Scott's
    Hello project.
    Licensed under GPL.
    README.txt hello.c
    Commit
    A
    c3d README.txt
    f13 hello.c
    This is Scott's
    Hello project.
    Licensed under
    GPL.
    c3d
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    f13

    View Slide

  59. #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    This is Scott's
    Hello project.
    Licensed under GPL.
    README.txt hello.c
    Commit
    A
    c3d README.txt
    f13 hello.c
    This is Scott's
    Hello project.
    Licensed under
    GPL.
    c3d
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    f13
    #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    6d4
    Commit
    B
    c3d README.txt
    6d4 hello.c

    View Slide

  60. #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    This is Scott's
    Hello project.
    Licensed under GPL.
    README.txt hello.c
    Commit
    A
    c3d README.txt
    f13 hello.c
    This is Scott's
    Hello project.
    Licensed under
    GPL.
    c3d
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    f13
    #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    6d4
    Commit
    B
    c3d README.txt
    6d4 hello.c

    View Slide

  61. #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    This is Scott's
    Hello project.
    Licensed under GPL.
    README.txt hello.c
    Commit
    A
    c3d README.txt
    f13 hello.c
    This is Scott's
    Hello project.
    Licensed under
    GPL.
    c3d
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    f13
    #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    6d4
    Commit
    B
    c3d README.txt
    6d4 hello.c

    View Slide

  62. #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    This is Scott's
    Hello project.
    Licensed under GPL.
    README.txt hello.c
    Commit
    A
    c3d README.txt
    f13 hello.c
    This is Scott's
    Hello project.
    Licensed under
    GPL.
    c3d
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    f13
    #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    6d4
    Commit
    B
    c3d README.txt
    6d4 hello.c

    View Slide

  63. #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    This is Scott's
    Hello project.
    Licensed under GPL.
    README.txt hola.c
    Commit
    A
    c3d README.txt
    f13 hello.c
    This is Scott's
    Hello project.
    Licensed under
    GPL.
    c3d
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    f13
    #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    6d4
    Commit
    B
    c3d README.txt
    6d4 hello.c

    View Slide

  64. #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    This is Scott's
    Hello project.
    Licensed under GPL.
    README.txt hola.c
    Commit
    A
    c3d README.txt
    f13 hello.c
    This is Scott's
    Hello project.
    Licensed under
    GPL.
    c3d
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    f13
    #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    6d4
    Commit
    B
    c3d README.txt
    6d4 hello.c
    Commit
    C
    c3d README.txt
    6d4 hola.c

    View Slide

  65. #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    This is Scott's
    Hello project.
    Licensed under GPL.
    README.txt hola.c
    Commit
    A
    c3d README.txt
    f13 hello.c
    This is Scott's
    Hello project.
    Licensed under
    GPL.
    c3d
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    f13
    #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    6d4
    Commit
    B
    c3d README.txt
    6d4 hello.c
    Commit
    C
    c3d README.txt
    6d4 hola.c

    View Slide

  66. #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    This is Scott's
    Hello project.
    Licensed under GPL.
    README.txt hola.c
    Commit
    A
    c3d README.txt
    f13 hello.c
    This is Scott's
    Hello project.
    Licensed under
    GPL.
    c3d
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    f13
    #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    6d4
    Commit
    B
    c3d README.txt
    6d4 hello.c
    Commit
    C
    c3d README.txt
    6d4 hola.c

    View Slide

  67. #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    This is Scott's
    Hello project.
    Licensed under GPL.
    README.txt hola.c
    Commit
    A
    c3d README.txt
    f13 hello.c
    This is Scott's
    Hello project.
    Licensed under
    GPL.
    c3d
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    f13
    #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    6d4
    Commit
    B
    c3d README.txt
    6d4 hello.c
    Commit
    C
    c3d README.txt
    6d4 hola.c

    View Slide

  68. #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    This is Scott's
    Hello project.
    Licensed under GPL.
    README.txt hola.c
    Commit
    A
    c3d README.txt
    f13 hello.c
    This is Scott's
    Hello project.
    Licensed under
    GPL.
    c3d
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    f13
    #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    6d4
    Commit
    B
    c3d README.txt
    6d4 hello.c
    Commit
    C
    c3d README.txt
    6d4 hola.c

    View Slide

  69. #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    This is Scott's
    Hello project.
    Licensed under GPL.
    README.txt hola.c
    Commit
    A
    c3d README.txt
    f13 hello.c
    This is Scott's
    Hello project.
    Licensed under
    GPL.
    c3d
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    f13
    #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    6d4
    Commit
    B
    c3d README.txt
    6d4 hello.c
    Commit
    C
    c3d README.txt
    6d4 hola.c

    View Slide

  70. #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    This is Scott's
    Hola project.
    Licensed under GPL.
    README.txt hola.c
    Commit
    A
    c3d README.txt
    f13 hello.c
    This is Scott's
    Hello project.
    Licensed under
    GPL.
    c3d
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    f13
    #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    6d4
    Commit
    B
    c3d README.txt
    6d4 hello.c
    Commit
    C
    c3d README.txt
    6d4 hola.c
    This is Scott's
    Hola project.
    Licensed under
    GPL.
    84f
    #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    hello.c

    View Slide

  71. #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    This is Scott's
    Hola project.
    Licensed under GPL.
    README.txt hola.c
    Commit
    A
    c3d README.txt
    f13 hello.c
    This is Scott's
    Hello project.
    Licensed under
    GPL.
    c3d
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    f13
    #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    6d4
    Commit
    B
    c3d README.txt
    6d4 hello.c
    Commit
    C
    c3d README.txt
    6d4 hola.c
    This is Scott's
    Hola project.
    Licensed under
    GPL.
    84f
    #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    hello.c

    View Slide

  72. #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    This is Scott's
    Hola project.
    Licensed under GPL.
    README.txt hola.c
    Commit
    A
    c3d README.txt
    f13 hello.c
    This is Scott's
    Hello project.
    Licensed under
    GPL.
    c3d
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    f13
    #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    6d4
    Commit
    B
    c3d README.txt
    6d4 hello.c
    Commit
    C
    c3d README.txt
    6d4 hola.c
    This is Scott's
    Hola project.
    Licensed under
    GPL.
    84f
    #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    hello.c

    View Slide

  73. #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    This is Scott's
    Hola project.
    Licensed under GPL.
    README.txt hola.c
    Commit
    A
    c3d README.txt
    f13 hello.c
    This is Scott's
    Hello project.
    Licensed under
    GPL.
    c3d
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    f13
    #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    6d4
    Commit
    B
    c3d README.txt
    6d4 hello.c
    Commit
    C
    c3d README.txt
    6d4 hola.c
    This is Scott's
    Hola project.
    Licensed under
    GPL.
    84f
    Commit
    D
    84f README.txt
    6d4 hola.c
    6d4 hello.c
    #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    hello.c

    View Slide

  74. #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    This is Scott's
    Hola project.
    Licensed under GPL.
    README.txt hola.c
    Commit
    A
    c3d README.txt
    f13 hello.c
    This is Scott's
    Hello project.
    Licensed under
    GPL.
    c3d
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    f13
    #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    6d4
    Commit
    B
    c3d README.txt
    6d4 hello.c
    Commit
    C
    c3d README.txt
    6d4 hola.c
    This is Scott's
    Hola project.
    Licensed under
    GPL.
    84f
    Commit
    D
    84f README.txt
    6d4 hola.c
    6d4 hello.c
    #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    hello.c

    View Slide

  75. Commit
    A
    This is Scott's Hello
    project.
    Licensed under GPL.
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    - printf("Hola\n");
    + printf("Hola\n");
    Commit
    B
    Commit
    C
    -Hello
    +Hola
    Commit
    D
    README.txt
    hello.c
    hola.c (rename)
    (copy)

    View Slide

  76. Commit
    A
    c3d README.txt
    f13 hello.c
    This is Scott's
    Hello project.
    Licensed under
    GPL.
    c3d
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    f13
    #include
    int main(void) {
    printf("Hola\n");
    return 0;
    }
    6d4
    Commit
    B
    c3d README.txt
    6d4 hello.c
    Commit
    C
    c3d README.txt
    6d4 hola.c
    This is Scott's
    Hola project.
    Licensed under
    GPL.
    84f
    Commit
    D
    84f README.txt
    6d4 hola.c
    6d4 hello.c
    Commit
    A
    This is Scott's Hello
    project.
    Licensed under GPL.
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    - printf("Hola\n");
    + printf("Hola\n");
    Commit
    B
    Commit
    C
    -Hello
    +Hola
    Commit
    D
    README.txt
    hello.c
    hola.c (rename)
    (copy)

    View Slide

  77. First Steps

    View Slide

  78. $ git config --global user.name “Scott Chacon”
    $ git config --global user.email “[email protected]

    View Slide

  79. $ git config --global color.ui true

    View Slide

  80. Getting a Repo

    View Slide

  81. Create One

    View Slide

  82. git init

    View Slide

  83. $ touch hello_world.rb
    $ git init
    $ git add .
    $ git commit -m ‘first commit’

    View Slide

  84. $ touch hello_world.rb
    $ git init
    $ git add .
    $ git commit -m ‘first commit’

    View Slide

  85. $ tree -a
    .
    |-- .git
    | |-- HEAD
    | |-- branches
    | |-- config
    | |-- description
    | |-- hooks
    | | |-- post-commit.sample
    | | |-- post-receive.sample
    | | |-- ...
    | | |-- pre-rebase.sample
    | | `-- update.sample
    | |-- info
    | | `-- exclude
    | |-- objects
    | | |-- info
    | | `-- pack
    | |-- refs
    | | |-- heads
    | | `-- tags
    | `-- remotes
    `-- hello_world.rb
    11 directories, 25 files

    View Slide

  86. $ tree -a
    .
    |-- .git
    | |-- HEAD
    | |-- branches
    | |-- config
    | |-- description
    | |-- hooks
    | | |-- post-commit.sample
    | | |-- post-receive.sample
    | | |-- ...
    | | |-- pre-rebase.sample
    | | `-- update.sample
    | |-- info
    | | `-- exclude
    | |-- objects
    | | |-- info
    | | `-- pack
    | |-- refs
    | | |-- heads
    | | `-- tags
    | `-- remotes
    `-- hello_world.rb
    11 directories, 25 files

    View Slide

  87. $ tree -a
    .
    |-- .git
    | |-- HEAD
    | |-- branches
    | |-- config
    | |-- description
    | |-- hooks
    | | |-- post-commit.sample
    | | |-- post-receive.sample
    | | |-- ...
    | | |-- pre-rebase.sample
    | | `-- update.sample
    | |-- info
    | | `-- exclude
    | |-- objects
    | | |-- info
    | | `-- pack
    | |-- refs
    | | |-- heads
    | | `-- tags
    | `-- remotes
    `-- hello_world.rb
    11 directories, 25 files

    View Slide

  88. $ touch hello_world.rb
    $ git init
    $ git add .
    $ git commit -m ‘first commit’

    View Slide

  89. $ touch hello_world.rb
    $ git init
    $ git add .
    $ git commit -m ‘first commit’

    View Slide

  90. $ tree -a
    .
    |-- .git
    | |-- COMMIT_EDITMSG
    | |-- HEAD
    | |-- branches
    | |-- config
    | |-- description
    | |-- hooks
    | | |-- applypatch-msg.sample
    | | `-- update.sample
    | |-- index
    | |-- info
    | | `-- exclude
    | |-- logs
    | | |-- HEAD
    | | `-- refs
    | | `-- heads
    | | `-- master
    | |-- objects
    | | |-- 32/09658ac8d80bc9726d3a33d77e3dfc5fe6035e
    | | |-- 53/9cd7886a627841d525a78d45cbc6396be20b41
    | | |-- e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391
    | | |-- info
    | | `-- pack
    | |-- refs
    | | |-- heads
    | | | `-- master
    | | `-- tags
    | `-- remotes
    `-- hello_world.rb
    17 directories, 33 files

    View Slide

  91. $ tree -a
    .
    |-- .git
    | |-- COMMIT_EDITMSG
    | |-- HEAD
    | |-- branches
    | |-- config
    | |-- description
    | |-- hooks
    | | |-- applypatch-msg.sample
    | | `-- update.sample
    | |-- index
    | |-- info
    | | `-- exclude
    | |-- logs
    | | |-- HEAD
    | | `-- refs
    | | `-- heads
    | | `-- master
    | |-- objects
    | | |-- 32/09658ac8d80bc9726d3a33d77e3dfc5fe6035e
    | | |-- 53/9cd7886a627841d525a78d45cbc6396be20b41
    | | |-- e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391
    | | |-- info
    | | `-- pack
    | |-- refs
    | | |-- heads
    | | | `-- master
    | | `-- tags
    | `-- remotes
    `-- hello_world.rb
    17 directories, 33 files

    View Slide

  92. $ tree -a
    .
    |-- .git
    | |-- COMMIT_EDITMSG
    | |-- HEAD
    | |-- branches
    | |-- config
    | |-- description
    | |-- hooks
    | | |-- applypatch-msg.sample
    | | `-- update.sample
    | |-- index
    | |-- info
    | | `-- exclude
    | |-- logs
    | | |-- HEAD
    | | `-- refs
    | | `-- heads
    | | `-- master
    | |-- objects
    | | |-- 32/09658ac8d80bc9726d3a33d77e3dfc5fe6035e
    | | |-- 53/9cd7886a627841d525a78d45cbc6396be20b41
    | | |-- e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391
    | | |-- info
    | | `-- pack
    | |-- refs
    | | |-- heads
    | | | `-- master
    | | `-- tags
    | `-- remotes
    `-- hello_world.rb
    17 directories, 33 files

    View Slide

  93. Clone One

    View Slide

  94. git clone

    View Slide

  95. $ git clone git://github.com/schacon/ticgit.git
    Initialized empty Git repository in /private/tmp/ticgit/.git/
    remote: Counting objects: 591, done.
    remote: Compressing objects: 100% (267/267), done.
    remote: Total 591 (delta 253), reused 587 (delta 252)
    Receiving objects: 100% (591/591), 73.05 KiB, done.
    Resolving deltas: 100% (253/253), done.
    $ cd ticgit/
    $ ls
    LICENSE! ! Rakefile! examples! note! ! ticgit.gemspec
    README!
    ! bin!
    ! lib!
    ! spec
    $

    View Slide

  96. $ git clone git://github.com/schacon/ticgit.git
    Initialized empty Git repository in /private/tmp/ticgit/.git/
    remote: Counting objects: 591, done.
    remote: Compressing objects: 100% (267/267), done.
    remote: Total 591 (delta 253), reused 587 (delta 252)
    Receiving objects: 100% (591/591), 73.05 KiB, done.
    Resolving deltas: 100% (253/253), done.
    $ cd ticgit/
    $ ls
    LICENSE! ! Rakefile! examples! note! ! ticgit.gemspec
    README!
    ! bin!
    ! lib!
    ! spec
    $

    View Slide

  97. $ git clone git://github.com/schacon/ticgit.git
    Initialized empty Git repository in /private/tmp/ticgit/.git/
    remote: Counting objects: 591, done.
    remote: Compressing objects: 100% (267/267), done.
    remote: Total 591 (delta 253), reused 587 (delta 252)
    Receiving objects: 100% (591/591), 73.05 KiB, done.
    Resolving deltas: 100% (253/253), done.
    $ cd ticgit/
    $ ls
    LICENSE! ! Rakefile! examples! note! ! ticgit.gemspec
    README!
    ! bin!
    ! lib!
    ! spec
    $

    View Slide

  98. $ git clone git://github.com/schacon/ticgit.git
    Initialized empty Git repository in /private/tmp/ticgit/.git/
    remote: Counting objects: 591, done.
    remote: Compressing objects: 100% (267/267), done.
    remote: Total 591 (delta 253), reused 587 (delta 252)
    Receiving objects: 100% (591/591), 73.05 KiB, done.
    Resolving deltas: 100% (253/253), done.
    $ cd ticgit/
    $ ls
    .git LICENSE! ! Rakefile! examples! note! !
    ticgit.gemspec README!
    ! bin!
    ! lib!
    ! spec
    $

    View Slide

  99. Recording a Snapshot

    View Slide

  100. A Basic Workflow
    Edit files
    Stage the changes
    Review your changes
    Commit the changes
    vim / emacs / etc
    git add (file)
    repo status
    git commit

    View Slide

  101. A Basic Workflow
    Edit files
    Stage the changes
    Review your changes
    Commit the changes
    vim / emacs / etc
    git add (file)
    repo status
    git commit

    View Slide

  102. A Basic Workflow
    Edit files
    Stage the changes
    Review your changes
    Commit the changes
    vim / emacs / etc
    git add (file)
    repo status
    git commit

    View Slide

  103. A Basic Workflow
    Edit files
    Stage the changes
    Review your changes
    Commit the changes
    vim / emacs / etc
    git add (file)
    git status / git diff
    git commit

    View Slide

  104. A Basic Workflow
    Edit files
    Stage the changes
    Review your changes
    Commit the changes
    vim / emacs / etc
    git add (file)
    git status / git diff
    git commit

    View Slide

  105. A Basicerer Workflow
    Edit files
    Stage and Commit
    vim / emacs / etc
    git commit -a

    View Slide

  106. What’s going on here?

    View Slide

  107. $ git commit
    Created commit 77d3001: descriptive commit message
    2 files changed, 4 insertions(+), 2 deletions(-)

    View Slide

  108. $ git commit
    Created commit 77d3001: descriptive commit message
    2 files changed, 4 insertions(+), 2 deletions(-)

    View Slide

  109. 77d3001

    View Slide

  110. 77d3001

    View Slide

  111. 77d3001a1de6bf8f5e431972fe4d25b01e595c0b

    View Slide

  112. 77d3001a1de6bf8f5e431972fe4d25b01e595c0b

    View Slide

  113. 77d3001a1de6bf8f5e431972fe4d25b01e595c0b

    View Slide

  114. 77d3001a1de6bf8f5e431972fe4d25b01e595c0b
    commit size
    ae668..
    tree
    parent
    author
    committer
    my commit message goes here
    and it is really, really cool
    c4ec5
    a149e
    Scott
    Scott

    View Slide

  115. 77d3001a1de6bf8f5e431972fe4d25b01e595c0b
    commit size
    ae668..
    tree
    parent
    author
    committer
    my commit message goes here
    and it is really, really cool
    c4ec5
    a149e
    Scott
    Scott
    tree c4ec543b0322744e55c5efc9b6c4e449d398dbff
    parent a149e2160b3f7573768cdc2fce24d0881f3577e1
    author Scott Chacon 1223402504 -0700
    committer Scott Chacon 1223402504 -0700
    descriptive commit message

    View Slide

  116. 77d3001a1de6bf8f5e431972fe4d25b01e595c0b
    commit size
    ae668..
    tree
    parent
    author
    committer
    my commit message goes here
    and it is really, really cool
    c4ec5
    a149e
    Scott
    Scott

    View Slide

  117. 77d3001a1de6bf8f5e431972fe4d25b01e595c0b
    commit size
    ae668..
    tree
    parent
    author
    committer
    my commit message goes here
    and it is really, really cool
    c4ec5
    a149e
    Scott
    Scott
    app.yaml
    index.yaml
    main.py
    ./ c4e
    03e
    1d3
    3d5

    View Slide

  118. 77d3001a1de6bf8f5e431972fe4d25b01e595c0b
    commit size
    ae668..
    tree
    parent
    author
    committer
    my commit message goes here
    and it is really, really cool
    c4ec5
    a149e
    Scott
    Scott
    app.yaml
    index.yaml
    main.py
    ./ c4e
    03e
    1d3
    3d5
    100644 blob 3d5cd3e1fc4424472ea247d1bb5fcfc3809aadab app.yaml
    100644 blob 1d31bf2dba611ba0de871320b4d73cdc39cc862b index.yaml
    100644 blob 03e68c28b73e2650bee34763369faf6e029d5053 main.py

    View Slide

  119. 77d3001a1de6bf8f5e431972fe4d25b01e595c0b
    commit size
    ae668..
    tree
    parent
    author
    committer
    my commit message goes here
    and it is really, really cool
    c4ec5
    a149e
    Scott
    Scott
    app.yaml
    index.yaml
    main.py
    ./ c4e
    03e
    1d3
    3d5

    View Slide

  120. commit size
    ae668..
    tree
    parent
    author
    committer
    my commit message goes here
    and it is really, really cool
    c4ec5
    a149e
    Scott
    Scott
    app.yaml
    index.yaml
    main.py
    ./ c4e
    03e
    1d3
    3d5
    commit size
    tree
    parent
    author
    committer
    this is the previous commit
    and I am very proud of it
    2de54
    38def
    Scott
    Scott

    View Slide

  121. commit size
    ae668..
    tree
    parent
    author
    committer
    my commit message goes here
    and it is really, really cool
    c4ec5
    a149e
    Scott
    Scott
    app.yaml
    index.yaml
    main.py
    ./ c4e
    03e
    1d3
    3d5
    commit size
    tree
    parent
    author
    committer
    this is the previous commit
    and I am very proud of it
    2de54
    38def
    Scott
    Scott
    app.yaml
    index.yaml
    main.py
    ./ c4e
    03e
    1d3
    3d5

    View Slide

  122. commit size
    ae668..
    tree
    parent
    author
    committer
    my commit message goes here
    and it is really, really cool
    c4ec5
    a149e
    Scott
    Scott
    app.yaml
    index.yaml
    main.py
    ./ c4e
    03e
    1d3
    3d5
    commit size
    tree
    parent
    author
    committer
    this is the previous commit
    and I am very proud of it
    2de54
    38def
    Scott
    Scott
    commit size
    tree
    parent
    author
    committer
    this is the commit before that
    and I'm not sure why
    2fe65
    90ecd
    Scott
    Scott
    app.yaml
    index.yaml
    main.py
    ./ c4e
    03e
    1d3
    3d5
    app.yaml
    index.yaml
    main.py
    ./ c4e
    03e
    1d3
    3d5
    commit size
    tree
    parent
    author
    committer
    this is the commit before that
    and I'm not sure why
    2fe65
    90ecd
    Scott
    Scott
    app.yaml
    index.yaml
    main.py
    ./ c4e
    03e
    1d3
    3d5

    View Slide

  123. commit size
    ae668..
    tree
    parent
    author
    committer
    my commit message goes here
    and it is really, really cool
    c4ec5
    a149e
    Scott
    Scott
    app.yaml
    index.yaml
    main.py
    ./ c4e
    03e
    1d3
    3d5
    commit size
    tree
    parent
    author
    committer
    this is the previous commit
    and I am very proud of it
    2de54
    38def
    Scott
    Scott
    commit size
    tree
    parent
    author
    committer
    this is the commit before that
    and I'm not sure why
    2fe65
    90ecd
    Scott
    Scott
    app.yaml
    index.yaml
    main.py
    ./ c4e
    03e
    1d3
    3d5
    app.yaml
    index.yaml
    main.py
    ./ c4e
    03e
    1d3
    3d5
    commit size
    tree
    parent
    author
    committer
    this is the commit before that
    and I'm not sure why
    2fe65
    90ecd
    Scott
    Scott
    app.yaml
    index.yaml
    main.py
    ./ c4e
    03e
    1d3
    3d5
    48e 77d
    a14
    38d
    c4e
    3d5
    1d3
    03e
    f46
    23f
    30e
    67e
    32a
    5b1

    View Slide

  124. commit size
    ae668..
    tree
    parent
    author
    committer
    my commit message goes here
    and it is really, really cool
    c4ec5
    a149e
    Scott
    Scott
    app.yaml
    index.yaml
    main.py
    ./ c4e
    03e
    1d3
    3d5
    commit size
    tree
    parent
    author
    committer
    this is the previous commit
    and I am very proud of it
    2de54
    38def
    Scott
    Scott
    commit size
    tree
    parent
    author
    committer
    this is the commit before that
    and I'm not sure why
    2fe65
    90ecd
    Scott
    Scott
    app.yaml
    index.yaml
    main.py
    ./ c4e
    03e
    1d3
    3d5
    app.yaml
    index.yaml
    main.py
    ./ c4e
    03e
    1d3
    3d5
    commit size
    tree
    parent
    author
    committer
    this is the commit before that
    and I'm not sure why
    2fe65
    90ecd
    Scott
    Scott
    app.yaml
    index.yaml
    main.py
    ./ c4e
    03e
    1d3
    3d5
    48e
    77d
    a14
    38d
    c4e
    3d5 1d3
    03e
    f46
    23f 30e
    67e
    32a
    5b1

    View Slide

  125. Repository
    3d4
    03e
    ae6
    5b1
    1d3
    c36
    f46
    23f
    6fe
    30e
    67e
    32a
    ffe
    38d
    5b1
    1d3
    254
    a14
    d23
    2d3
    48e
    735
    de3
    c4e
    c4e
    77d
    3d5

    View Slide

  126. Repository
    3d4
    03e
    ae6
    5b1
    1d3
    c36
    f46
    23f
    6fe
    30e
    67e
    32a
    ffe
    38d
    5b1
    1d3
    254
    a14
    d23
    2d3
    48e
    735
    de3
    c4e
    c4e
    77d
    3d5
    git checkout branch

    View Slide

  127. Repository
    3d4
    03e
    ae6
    5b1
    1d3
    c36
    f46
    23f
    6fe
    30e
    67e
    32a
    ffe
    38d
    5b1
    1d3
    254
    a14
    d23
    2d3
    48e
    735
    de3
    c4e
    c4e
    77d
    3d5
    git checkout branch

    View Slide

  128. Working Directory
    Index
    Rakefile
    README
    simplegit.rb
    ./
    lib/
    ./Rakefile
    ./README
    ./lib/simplegit.rb
    ./
    ./lib/ c36
    3d4
    03e
    5b1
    1d3
    Repository
    3d4
    03e
    ae6
    5b1
    1d3
    c36
    f46
    23f
    6fe
    30e
    67e
    32a
    ffe
    38d
    5b1
    1d3
    254
    a14
    d23
    2d3
    48e
    735
    de3
    c4e
    c4e
    77d
    3d5

    View Slide

  129. Repository
    3d4
    03e
    ae6
    5b1
    1d3
    c36
    f46
    23f
    6fe
    30e
    67e
    32a
    ffe
    38d
    5b1
    1d3
    254
    a14
    d23
    2d3
    48e
    735
    de3
    c4e
    c4e
    77d
    3d5
    Working Directory
    Index
    Rakefile
    README
    simplegit.rb
    ./
    lib/
    ./Rakefile
    ./README
    ./lib/simplegit.rb
    ./
    ./lib/ c36
    3d4
    03e
    5b1
    1d3

    View Slide

  130. Repository
    3d4
    03e
    ae6
    5b1
    1d3
    c36
    f46
    23f
    6fe
    30e
    67e
    32a
    ffe
    38d
    5b1
    1d3
    254
    a14
    d23
    2d3
    48e
    735
    de3
    c4e
    c4e
    77d
    3d5
    Working Directory
    Index
    Rakefile
    README
    simplegit.rb
    ./
    lib/
    ./Rakefile
    ./README
    ./lib/simplegit.rb
    ./
    ./lib/ c36
    3d4
    03e
    5b1
    1d3

    View Slide

  131. Repository
    3d4
    03e
    ae6
    5b1
    1d3
    c36
    f46
    23f
    6fe
    30e
    67e
    32a
    ffe
    38d
    5b1
    1d3
    254
    a14
    d23
    2d3
    48e
    735
    de3
    c4e
    c4e
    77d
    3d5
    Working Directory
    Index
    Rakefile
    README
    simplegit.rb
    ./
    lib/
    ./Rakefile
    ./README
    ./lib/simplegit.rb
    ./
    ./lib/ c36
    3d4
    03e
    5b1
    1d3

    View Slide

  132. Repository
    3d4
    03e
    ae6
    5b1
    1d3
    c36
    f46
    23f
    6fe
    30e
    67e
    32a
    ffe
    38d
    5b1
    1d3
    254
    a14
    d23
    2d3
    48e
    735
    de3
    c4e
    c4e
    77d
    3d5
    Working Directory
    Index
    Rakefile
    README
    simplegit.rb
    ./
    lib/
    ./Rakefile
    ./README
    ./lib/simplegit.rb
    ./
    ./lib/ c36
    3d4
    03e
    5b1
    1d3
    git add

    View Slide

  133. Repository
    3d4
    03e
    ae6
    5b1
    1d3
    c36
    f46
    23f
    6fe
    30e
    67e
    32a
    ffe
    38d
    5b1
    1d3
    254
    a14
    d23
    2d3
    48e
    735
    de3
    c4e
    c4e
    77d
    3d5
    Working Directory
    Index
    Rakefile
    README
    simplegit.rb
    ./
    lib/
    ./Rakefile
    ./README
    ./lib/simplegit.rb
    ./
    ./lib/ c36
    3d4
    03e
    5b1
    1d3
    git add
    34f

    View Slide

  134. Repository
    3d4
    03e
    ae6
    5b1
    1d3
    c36
    f46
    23f
    6fe
    30e
    67e
    32a
    ffe
    38d
    5b1
    1d3
    254
    a14
    d23
    2d3
    48e
    735
    de3
    c4e
    c4e
    77d
    3d5
    Working Directory
    Index
    Rakefile
    README
    simplegit.rb
    ./
    lib/
    ./Rakefile
    ./README
    ./lib/simplegit.rb
    ./
    ./lib/ c36
    3d4
    03e
    5b1
    1d3
    git commit
    34f
    a08
    3da
    34f
    ae9

    View Slide

  135. Repository
    3d4
    03e
    ae6
    5b1
    1d3
    c36
    f46
    23f
    6fe
    30e
    67e
    32a
    ffe
    38d
    5b1
    1d3
    254
    a14
    d23
    2d3
    48e
    735
    de3
    c4e
    c4e
    77d
    3d5
    Working Directory
    Index
    Rakefile
    README
    simplegit.rb
    ./
    lib/
    ./Rakefile
    ./README
    ./lib/simplegit.rb
    ./
    ./lib/ c36
    3d4
    03e
    5b1
    1d3
    34f
    a08
    3da
    34f
    ae9

    View Slide

  136. Repository
    3d4
    03e
    ae6
    5b1
    1d3
    c36
    f46
    23f
    6fe
    30e
    67e
    32a
    ffe
    38d
    5b1
    1d3
    254
    a14
    d23
    2d3
    48e
    735
    de3
    c4e
    c4e
    77d
    3d5
    Working Directory
    Index
    Rakefile
    README
    simplegit.rb
    ./
    lib/
    ./Rakefile
    ./README
    ./lib/simplegit.rb
    ./
    ./lib/ c36
    3d4
    03e
    5b1
    1d3
    34f
    a08
    3da
    34f
    ae9

    View Slide

  137. Branching and Merging

    View Slide

  138. branches

    View Slide

  139. branches
    lightweight, movable
    pointers to a commit
    C1
    branch

    View Slide

  140. branching

    View Slide

  141. git branch

    View Slide

  142. git checkout

    View Slide

  143. Commit
    98ca9
    master
    HEAD
    c3d README.txt
    f13 hello.c
    This is Scott's
    Hello project.
    Licensed under
    GPL.
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }

    View Slide

  144. Commit
    98ca9
    master
    HEAD
    c3d README.txt
    f13 hello.c
    This is Scott's
    Hello project.
    Licensed under
    GPL.
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }

    View Slide

  145. Commit
    98ca9
    master
    HEAD
    c3d README.txt
    f13 hello.c
    This is Scott's
    Hello project.
    Licensed under
    GPL.
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }

    View Slide

  146. Commit
    98ca9
    master
    HEAD
    c3d README.txt
    f13 hello.c
    This is Scott's
    Hello project.
    Licensed under
    GPL.
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }

    View Slide

  147. Commit
    98ca9
    master
    HEAD
    c3d README.txt
    f13 hello.c
    This is Scott's
    Hello project.
    Licensed under
    GPL.
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    98ca9
    i18n
    master
    HEAD
    git branch i18n

    View Slide

  148. Commit
    98ca9
    master
    HEAD
    c3d README.txt
    f13 hello.c
    This is Scott's
    Hello project.
    Licensed under
    GPL.
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    98ca9
    i18n
    master
    HEAD
    git branch i18n

    View Slide

  149. Commit
    98ca9
    master
    HEAD
    c3d README.txt
    f13 hello.c
    This is Scott's
    Hello project.
    Licensed under
    GPL.
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    98ca9
    i18n
    master
    HEAD
    git branch

    View Slide

  150. $ git branch
    * master
    i18n
    Commit
    98ca9
    master
    HEAD
    c3d README.txt
    f13 hello.c
    This is Scott's
    Hello project.
    Licensed under
    GPL.
    #include
    int main(void) {
    printf("Hello\n");
    return 0;
    }
    98ca9
    i18n
    master
    HEAD
    git branch

    View Slide

  151. $ find .git/refs
    .git/refs
    .git/refs/heads
    .git/refs/heads/default
    .git/refs/heads/experiment

    View Slide

  152. $ find .git/refs
    .git/refs
    .git/refs/heads
    .git/refs/heads/master
    .git/refs/heads/i18n

    View Slide

  153. $ find .git/refs
    .git/refs
    .git/refs/heads
    .git/refs/heads/master
    .git/refs/heads/i18n
    $ cat .git/refs/heads/master
    98ca909dc9e38af91565082bdf93577ff555489e

    View Slide

  154. 98ca9
    a23fe
    i18n
    master
    HEAD
    HEAD

    View Slide

  155. 98ca9
    a23fe
    i18n
    master
    HEAD
    HEAD
    git checkout i18n

    View Slide

  156. 98ca9
    a23fe
    i18n
    master
    HEAD
    HEAD

    View Slide

  157. 98ca9
    a23fe
    i18n
    master
    HEAD
    HEAD
    git commit

    View Slide

  158. 98ca9
    a23fe
    i18n
    master
    HEAD
    HEAD
    git commit

    View Slide

  159. git commit
    98ca9
    a23fe
    master
    i18n
    HEAD

    View Slide

  160. 98ca9
    a23fe
    master
    i18n
    HEAD

    View Slide

  161. git commit
    98ca9
    a23fe
    master
    i18n
    HEAD

    View Slide

  162. git commit
    98ca9
    a23fe 3acd1
    master
    i18n
    HEAD

    View Slide

  163. 98ca9
    a23fe 3acd1
    master
    i18n
    HEAD

    View Slide

  164. 98ca9
    a23fe 3acd1
    master
    i18n
    HEAD
    git checkout -b iss53 master

    View Slide

  165. 98ca9
    a23fe
    iss53
    3acd1
    master
    HEAD
    i18n
    git checkout -b iss53 master

    View Slide

  166. 98ca9
    a23fe
    iss53
    3acd1
    master
    HEAD
    i18n
    git checkout master;
    git checkout -b iss53

    View Slide

  167. 98ca9
    a23fe
    iss53
    3acd1
    master
    HEAD
    i18n
    git checkout master;
    git branch iss53;
    git checkout iss53

    View Slide

  168. 98ca9
    a23fe
    iss53
    3acd1
    master
    HEAD
    i18n
    git checkout -b iss53 master

    View Slide

  169. 98ca9
    a23fe
    iss53
    3acd1
    master
    HEAD
    i18n

    View Slide

  170. git commit
    98ca9
    a23fe
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n

    View Slide

  171. 98ca9
    a23fe
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n

    View Slide

  172. git commit
    98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n

    View Slide

  173. 98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n

    View Slide

  174. 98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    c3d README.txt
    f13 hello.c
    c3d README.txt
    f13 hello.c
    43d issue.c
    c3d README.txt
    f13 hello.c
    5ff issue.c
    c3d README.txt
    f13 hello.c
    d3a i18n.c
    c3d README.txt
    9ec hello.c
    3a6 i18n.c

    View Slide

  175. 98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    c3d README.txt
    f13 hello.c
    c3d README.txt
    f13 hello.c
    43d issue.c
    c3d README.txt
    f13 hello.c
    5ff issue.c
    c3d README.txt
    f13 hello.c
    d3a i18n.c
    c3d README.txt
    9ec hello.c
    3a6 i18n.c

    View Slide

  176. 98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    c3d README.txt
    f13 hello.c
    c3d README.txt
    f13 hello.c
    43d issue.c
    c3d README.txt
    f13 hello.c
    5ff issue.c
    c3d README.txt
    f13 hello.c
    d3a i18n.c
    c3d README.txt
    9ec hello.c
    3a6 i18n.c

    View Slide

  177. 98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    c3d README.txt
    f13 hello.c
    c3d README.txt
    f13 hello.c
    43d issue.c
    c3d README.txt
    f13 hello.c
    5ff issue.c
    c3d README.txt
    f13 hello.c
    d3a i18n.c
    c3d README.txt
    9ec hello.c
    3a6 i18n.c

    View Slide

  178. 98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    c3d README.txt
    f13 hello.c
    c3d README.txt
    f13 hello.c
    43d issue.c
    c3d README.txt
    f13 hello.c
    5ff issue.c
    c3d README.txt
    f13 hello.c
    d3a i18n.c
    c3d README.txt
    9ec hello.c
    3a6 i18n.c

    View Slide

  179. 98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    c3d README.txt
    f13 hello.c
    c3d README.txt
    f13 hello.c
    43d issue.c
    c3d README.txt
    f13 hello.c
    5ff issue.c
    c3d README.txt
    f13 hello.c
    d3a i18n.c
    c3d README.txt
    9ec hello.c
    3a6 i18n.c

    View Slide

  180. 98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n

    View Slide

  181. merging

    View Slide

  182. git merge

    View Slide

  183. 98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n

    View Slide

  184. 98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    git checkout master

    View Slide

  185. 98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n

    View Slide

  186. 98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    git merge iss53

    View Slide

  187. 98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    git merge iss53
    98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n

    View Slide

  188. fast-forward merge

    View Slide

  189. 98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    git merge iss53
    98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n

    View Slide

  190. git merge iss53
    98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n

    View Slide

  191. 98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n

    View Slide

  192. git merge i18n
    98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n

    View Slide

  193. non fast-forward merge

    View Slide

  194. git merge i18n
    98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n

    View Slide

  195. git merge i18n
    98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n

    View Slide

  196. git merge i18n
    98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    c3d README.txt
    f13 hello.c
    c3d README.txt
    f13 hello.c
    5ff issue.c
    c3d README.txt
    9ec hello.c
    3a6 i18n.c

    View Slide

  197. git merge i18n
    98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    c3d README.txt
    f13 hello.c
    c3d README.txt
    f13 hello.c
    5ff issue.c
    c3d README.txt
    9ec hello.c
    3a6 i18n.c

    View Slide

  198. git merge i18n
    98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    c3d README.txt
    f13 hello.c
    c3d README.txt
    f13 hello.c
    5ff issue.c
    c3d README.txt
    9ec hello.c
    3a6 i18n.c

    View Slide

  199. git merge i18n
    98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    c3d README.txt
    f13 hello.c
    c3d README.txt
    f13 hello.c
    5ff issue.c
    c3d README.txt
    9ec hello.c
    3a6 i18n.c

    View Slide

  200. 98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    c3d README.txt
    f13 hello.c
    c3d README.txt
    f13 hello.c
    5ff issue.c
    c3d README.txt
    9ec hello.c
    3a6 i18n.c
    95c41
    c3d README.txt
    9ec hello.c
    5ff issue.c
    3a6 i18n.c
    git merge i18n

    View Slide

  201. 98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    c3d README.txt
    f13 hello.c
    c3d README.txt
    f13 hello.c
    5ff issue.c
    c3d README.txt
    9ec hello.c
    3a6 i18n.c
    95c41
    c3d README.txt
    9ec hello.c
    5ff issue.c
    3a6 i18n.c
    git merge i18n

    View Slide

  202. 98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    c3d README.txt
    f13 hello.c
    c3d README.txt
    f13 hello.c
    5ff issue.c
    c3d README.txt
    9ec hello.c
    3a6 i18n.c
    95c41
    c3d README.txt
    9ec hello.c
    5ff issue.c
    3a6 i18n.c

    View Slide

  203. 98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    c3d README.txt
    f13 hello.c
    c3d README.txt
    f13 hello.c
    5ff issue.c
    c3d README.txt
    9ec hello.c
    3a6 i18n.c
    95c41
    c3d README.txt
    9ec hello.c
    5ff issue.c
    3a6 i18n.c

    View Slide

  204. 98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    c3d README.txt
    f13 hello.c
    c3d README.txt
    f13 hello.c
    5ff issue.c
    c3d README.txt
    9ec hello.c
    3a6 i18n.c
    95c41
    c3d README.txt
    9ec hello.c
    5ff issue.c
    3a6 i18n.c

    View Slide

  205. 98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    c3d README.txt
    f13 hello.c
    c3d README.txt
    f13 hello.c
    5ff issue.c
    c3d README.txt
    9ec hello.c
    3a6 i18n.c
    95c41
    c3d README.txt
    9ec hello.c
    5ff issue.c
    3a6 i18n.c

    View Slide

  206. 98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    c3d README.txt
    f13 hello.c
    c3d README.txt
    f13 hello.c
    5ff issue.c
    c3d README.txt
    9ec hello.c
    3a6 i18n.c
    95c41
    c3d README.txt
    9ec hello.c
    5ff issue.c
    3a6 i18n.c

    View Slide

  207. 98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    c3d README.txt
    f13 hello.c
    c3d README.txt
    f13 hello.c
    5ff issue.c
    c3d README.txt
    9ec hello.c
    3a6 i18n.c
    95c41
    c3d README.txt
    9ec hello.c
    5ff issue.c
    3a6 i18n.c

    View Slide

  208. 98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    95c41

    View Slide

  209. merge conflicts

    View Slide

  210. $ git merge iss53
    Auto-merging index.html
    CONFLICT (content): Merge conflict in index.html
    Automatic merge failed; fix conflicts and then commit the result.

    View Slide

  211. $ git merge iss53
    Auto-merging index.html
    CONFLICT (content): Merge conflict in index.html
    Automatic merge failed; fix conflicts and then commit the result.

    View Slide

  212. $ git merge iss53
    Auto-merging index.html
    CONFLICT (content): Merge conflict in index.html
    Automatic merge failed; fix conflicts and then commit the result.
    $ git status
    index.html: needs merge
    # On branch master
    # Changed but not updated:
    # (use "git add ..." to update what will be committed)
    # (use "git checkout -- ..." to discard changes in
    working directory)
    #
    #! unmerged: index.html
    #

    View Slide

  213. <<<<<<< HEAD:index.html
    contact :
    [email protected]
    =======

    please contact us at [email protected]

    >>>>>>> iss53:index.html

    View Slide

  214. $ git add [file]

    View Slide

  215. $ git status
    # On branch master
    # Changes to be committed:
    # (use "git reset HEAD ..." to unstage
    #
    #!
    modified: index.html
    #

    View Slide

  216. git mergetool

    View Slide

  217. $ git mergetool
    merge tool candidates: kdiff3 tkdiff xxdiff meld gvimdiff opendiff
    emerge vimdiff
    Merging the files: index.html
    Normal merge conflict for 'index.html':
    {local}: modified
    {remote}: modified
    Hit return to start merge resolution tool (opendiff):

    View Slide

  218. $ git commit

    View Slide

  219. reintegration merges

    View Slide

  220. 98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    95c41

    View Slide

  221. 98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    95c41
    git checkout i18n

    View Slide

  222. git commit
    98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    95c41
    4fa23

    View Slide

  223. git checkout master
    98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    95c41
    4fa23

    View Slide

  224. git merge i18n
    98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    95c41
    4fa23

    View Slide

  225. 98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    95c41
    4fa23
    git merge i18n

    View Slide

  226. 98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    95c41
    4fa23
    c3d README.txt
    9ec hello.c
    3a6 i18n.c
    c3d README.txt
    9ec hello.c
    5ff issue.c
    3a6 i18n.c
    45d README.txt
    9ec hello.c
    3a6 i18n.c
    git merge i18n

    View Slide

  227. 98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    95c41
    4fa23
    c3d README.txt
    9ec hello.c
    3a6 i18n.c
    c3d README.txt
    9ec hello.c
    5ff issue.c
    3a6 i18n.c
    45d README.txt
    9ec hello.c
    3a6 i18n.c
    git merge i18n

    View Slide

  228. 98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    95c41
    4fa23
    c3d README.txt
    9ec hello.c
    3a6 i18n.c
    c3d README.txt
    9ec hello.c
    5ff issue.c
    3a6 i18n.c
    45d README.txt
    9ec hello.c
    3a6 i18n.c
    git merge i18n

    View Slide

  229. 98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    95c41
    4fa23
    c3d README.txt
    9ec hello.c
    3a6 i18n.c
    c3d README.txt
    9ec hello.c
    5ff issue.c
    3a6 i18n.c
    45d README.txt
    9ec hello.c
    3a6 i18n.c
    git merge i18n

    View Slide

  230. 67a2d
    98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    95c41
    4fa23
    c3d README.txt
    9ec hello.c
    3a6 i18n.c
    c3d README.txt
    9ec hello.c
    5ff issue.c
    3a6 i18n.c
    45d README.txt
    9ec hello.c
    3a6 i18n.c
    45d README.txt
    9ec hello.c
    5ff issue.c
    3a6 i18n.c
    git merge i18n

    View Slide

  231. 67a2d
    98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    95c41
    4fa23
    c3d README.txt
    9ec hello.c
    3a6 i18n.c
    c3d README.txt
    9ec hello.c
    5ff issue.c
    3a6 i18n.c
    45d README.txt
    9ec hello.c
    3a6 i18n.c
    45d README.txt
    9ec hello.c
    5ff issue.c
    3a6 i18n.c
    git merge i18n

    View Slide

  232. git merge i18n
    67a2d
    98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    95c41
    4fa23

    View Slide

  233. Why is this cool?

    View Slide

  234. try out an idea

    View Slide

  235. isolate work units

    View Slide

  236. long running topics

    View Slide

  237. long running topics
    continuous merging

    View Slide

  238. Deleting Branches

    View Slide

  239. git branch -d branch

    View Slide

  240. 98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    95c41
    4fa23

    View Slide

  241. 98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    95c41
    4fa23

    View Slide

  242. 98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    95c41
    4fa23

    View Slide

  243. 98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    95c41
    4fa23

    View Slide

  244. 98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    95c41
    4fa23

    View Slide

  245. git branch -D branch

    View Slide

  246. Collaborating

    View Slide

  247. remotes

    View Slide

  248. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master

    View Slide

  249. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    git clone [email protected]:project.git

    View Slide

  250. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    git clone [email protected]:project.git

    View Slide

  251. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    git clone [email protected]:project.git

    View Slide

  252. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    git clone [email protected]:project.git

    View Slide

  253. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master

    View Slide

  254. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    git commit

    View Slide

  255. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    git commit

    View Slide

  256. git push

    View Slide

  257. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    git push origin master

    View Slide

  258. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    git push origin master

    View Slide

  259. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    git push origin master

    View Slide

  260. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    git push origin master
    i want to push
    some new stuff

    View Slide

  261. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    git push origin master
    i’ve got master
    at 31b8

    View Slide

  262. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    git push origin master
    cool, i see that in
    the history of what i
    want to push

    View Slide

  263. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    git push origin master
    here’s the difference
    dee9 9e05

    View Slide

  264. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    git push origin master
    dee9 9e05

    View Slide

  265. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    git push origin master
    dee9 9e05

    View Slide

  266. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    dee9 9e05
    ok, everything
    looks good.

    View Slide

  267. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    dee9 9e05
    origin/master

    View Slide

  268. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    dee9 9e05
    git push origin master
    origin/master

    View Slide

  269. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    dee9 9e05
    git push origin master
    i want to push
    some new stuff
    origin/master

    View Slide

  270. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    dee9 9e05
    git push origin master
    i’ve got master
    at 9e05
    origin/master

    View Slide

  271. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    dee9 9e05
    git push origin master
    not familiar
    with that
    origin/master

    View Slide

  272. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    dee9 9e05
    git push origin master
    crap.
    origin/master

    View Slide

  273. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    dee9 9e05
    git push origin master
    it would be mean of
    me to overwrite
    scott’s changes...
    origin/master

    View Slide

  274. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    dee9 9e05
    origin/master

    View Slide

  275. git fetch

    View Slide

  276. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    dee9 9e05
    origin/master

    View Slide

  277. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    dee9 9e05
    dee9 9e05
    git fetch
    origin/master

    View Slide

  278. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    dee9 9e05
    dee9 9e05
    git fetch
    origin/master

    View Slide

  279. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    dee9 9e05
    dee9 9e05
    origin/master

    View Slide

  280. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    dee9 9e05
    dee9 9e05
    a967
    git merge origin/master
    origin/master

    View Slide

  281. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    dee9 9e05
    dee9 9e05
    a967
    git push origin master
    origin/master

    View Slide

  282. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    dee9 9e05
    dee9 9e05
    a967
    git push origin master
    ok, let’s try
    that again. i
    want to push
    some stuff
    origin/master

    View Slide

  283. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    dee9 9e05
    dee9 9e05
    a967
    git push origin master
    i’ve got master
    at 9e05
    origin/master

    View Slide

  284. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    dee9 9e05
    dee9 9e05
    a967
    git push origin master
    freakin sweet, i
    can see that in
    my history
    origin/master

    View Slide

  285. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    dee9 9e05
    dee9 9e05
    a967
    git push origin master
    let’s do this
    e1cf 8091 a967
    origin/master

    View Slide

  286. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    dee9 9e05
    dee9 9e05
    a967
    git push origin master
    e1cf 8091 a967
    origin/master

    View Slide

  287. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    dee9 9e05
    dee9 9e05
    a967
    git push origin master
    e1cf 8091 a967
    origin/master

    View Slide

  288. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    dee9 9e05
    dee9 9e05
    a967
    a967
    e1cf 8091
    origin/master
    ok, we’re good.

    View Slide

  289. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    dee9 9e05
    dee9 9e05
    a967
    a967
    e1cf 8091

    View Slide

  290. pushing other branches

    View Slide

  291. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    dee9 9e05
    dee9 9e05
    a967
    a967
    e1cf 8091

    View Slide

  292. git checkout -b iss53 31b8; git commit; git commit
    git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    dee9 9e05
    dee9 9e05
    a967
    a967
    e1cf 8091
    4ca2 74ba
    iss53

    View Slide

  293. git push origin iss53
    git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    dee9 9e05
    dee9 9e05
    a967
    a967
    e1cf 8091
    4ca2 74ba
    iss53

    View Slide

  294. git push origin iss53
    git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    dee9 9e05
    dee9 9e05
    a967
    a967
    e1cf 8091
    4ca2 74ba
    iss53
    i want to push
    some stuff

    View Slide

  295. git push origin iss53
    git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    dee9 9e05
    dee9 9e05
    a967
    a967
    e1cf 8091
    4ca2 74ba
    iss53
    i’ve got master
    at a967

    View Slide

  296. git push origin iss53
    git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    dee9 9e05
    dee9 9e05
    a967
    a967
    e1cf 8091
    4ca2 74ba
    iss53
    i don’t care

    View Slide

  297. git push origin iss53
    git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    dee9 9e05
    dee9 9e05
    a967
    a967
    e1cf 8091
    4ca2 74ba
    iss53
    i’m trying to
    push iss53

    View Slide

  298. git push origin iss53
    git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    dee9 9e05
    dee9 9e05
    a967
    a967
    e1cf 8091
    4ca2 74ba
    iss53
    here you go

    View Slide

  299. git push origin iss53
    git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    dee9 9e05
    dee9 9e05
    a967
    a967
    e1cf 8091
    4ca2 74ba
    iss53
    4ca2 74ba

    View Slide

  300. git push origin iss53
    git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    dee9 9e05
    dee9 9e05
    a967
    a967
    e1cf 8091
    4ca2 74ba
    iss53
    4ca2 74ba

    View Slide

  301. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    dee9 9e05
    dee9 9e05
    a967
    a967
    e1cf 8091
    4ca2 74ba
    iss53
    4ca2 74ba iss53

    View Slide

  302. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    dee9 9e05
    dee9 9e05
    a967
    a967
    e1cf 8091
    4ca2 74ba
    iss53
    4ca2 74ba iss53
    git fetch
    4ca2 74ba

    View Slide

  303. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    dee9 9e05
    dee9 9e05
    a967
    a967
    e1cf 8091
    4ca2 74ba
    iss53
    4ca2 74ba iss53
    git fetch
    4ca2 74ba

    View Slide

  304. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    dee9 9e05
    dee9 9e05
    a967
    a967
    e1cf 8091
    4ca2 74ba
    iss53
    4ca2 74ba iss53
    git fetch
    4ca2 74ba

    View Slide

  305. git.ourcompany.com
    Nick's Computer
    origin/master
    f42c 31b8
    Scott's Computer
    origin/master
    f42c 31b8
    f42c 31b8
    master
    master
    master
    dee9 9e05
    e1cf 8091
    dee9 9e05
    dee9 9e05
    a967
    a967
    e1cf 8091
    4ca2 74ba
    iss53
    4ca2 74ba iss53
    4ca2 74ba
    origin/iss53

    View Slide

  306. git pull

    View Slide

  307. pull == fetch + merge

    View Slide

  308. multiple remotes

    View Slide

  309. developer
    nick
    developer
    jessica
    my repo
    5ec
    e4a
    4a7
    ce0 master

    View Slide

  310. developer
    nick
    developer
    jessica
    my repo
    5ec
    e4a
    4a7
    ce0 master
    commit

    View Slide

  311. developer
    nick
    developer
    jessica
    my repo
    5ec
    e4a
    4a7
    ce0 master
    tree

    View Slide

  312. developer
    nick
    developer
    jessica
    my repo
    5ec
    e4a
    4a7
    ce0 master
    blobs

    View Slide

  313. schacon/
    project
    developer
    nick
    developer
    jessica
    "public"
    my repo
    5ec
    e4a
    4a7
    ce0 master
    git push public
    public/master
    5ec
    e4a
    4a7
    ce0

    View Slide

  314. schacon/
    project
    developer
    jessica
    "public"
    my repo
    5ec
    e4a
    4a7
    ce0 master
    git clone (url)
    public/master
    5ec
    e4a
    4a7
    ce0
    5ec
    e4a
    4a7
    ce0
    developer
    nick

    View Slide

  315. schacon/
    project
    developer
    jessica
    "public"
    my repo
    5ec
    e4a
    4a7
    ce0 master
    git commit
    public/master
    5ec
    e4a
    4a7
    ce0
    5ec
    e4a
    4a7
    ce0
    developer
    nick
    c12
    ec5
    24f

    View Slide

  316. schacon/
    project
    "public"
    my repo
    5ec
    e4a
    4a7
    ce0 master
    public/master
    5ec
    e4a
    4a7
    ce0
    5ec
    e4a
    4a7
    ce0
    developer
    nick
    c12
    ec5
    24f
    git clone (url)
    5ec
    e4a
    4a7
    ce0
    developer
    jessica

    View Slide

  317. schacon/
    project
    "public"
    my repo
    5ec
    e4a
    4a7
    ce0 master
    public/master
    5ec
    e4a
    4a7
    ce0
    5ec
    e4a
    4a7
    ce0
    developer
    nick
    c12
    ec5
    24f
    5ec
    e4a
    4a7
    ce0
    developer
    jessica
    2fb
    df7
    4ea
    a09
    git commit

    View Slide

  318. schacon/
    project
    "public"
    my repo
    5ec
    e4a
    4a7
    ce0 master
    public/master
    5ec
    e4a
    4a7
    ce0
    5ec
    e4a
    4a7
    ce0
    developer
    nick
    c12
    ec5
    24f
    5ec
    e4a
    4a7
    ce0
    developer
    jessica
    2fb
    df7
    4ea
    a09
    git push
    5ec
    e4a
    4a7
    ce0
    nickh/
    project
    c12
    ec5
    24f
    5ec
    e4a
    4a7
    ce0
    jessica/
    project
    2fb
    df7
    4ea
    a09

    View Slide

  319. schacon/
    project
    "public"
    my repo
    5ec
    e4a
    4a7
    ce0 master
    public/master
    5ec
    e4a
    4a7
    ce0
    5ec
    e4a
    4a7
    ce0
    developer
    nick
    c12
    ec5
    24f
    5ec
    e4a
    4a7
    ce0
    developer
    jessica
    2fb
    df7
    4ea
    a09
    git remote add nick git://github.com/nickh/project.git
    5ec
    e4a
    4a7
    ce0
    nickh/
    project
    c12
    ec5
    24f
    5ec
    e4a
    4a7
    ce0
    jessica/
    project
    2fb
    df7
    4ea
    a09
    "nick"
    git remote add nick git://github.com/nickh/project.git

    View Slide

  320. schacon/
    project
    "public"
    my repo
    5ec
    e4a
    4a7
    ce0 master
    public/master
    5ec
    e4a
    4a7
    ce0
    5ec
    e4a
    4a7
    ce0
    developer
    nick
    c12
    ec5
    24f
    5ec
    e4a
    4a7
    ce0
    developer
    jessica
    2fb
    df7
    4ea
    a09
    git remote add nick git://github.com/nickh/project.git
    5ec
    e4a
    4a7
    ce0
    nickh/
    project
    c12
    ec5
    24f
    5ec
    e4a
    4a7
    ce0
    jessica/
    project
    2fb
    df7
    4ea
    a09
    "nick"
    “nick”
    git remote add nick git://github.com/nickh/project.git

    View Slide

  321. schacon/
    project
    "public"
    my repo
    5ec
    e4a
    4a7
    ce0 master
    public/master
    5ec
    e4a
    4a7
    ce0
    5ec
    e4a
    4a7
    ce0
    developer
    nick
    c12
    ec5
    24f
    5ec
    e4a
    4a7
    ce0
    developer
    jessica
    2fb
    df7
    4ea
    a09
    git remote add jess git://github.com/jessica/project.git
    5ec
    e4a
    4a7
    ce0
    nickh/
    project
    c12
    ec5
    24f
    5ec
    e4a
    4a7
    ce0
    jessica/
    project
    2fb
    df7
    4ea
    a09
    "nick" "jess"
    git remote add jess git://github.com/jessica/project.git

    View Slide

  322. schacon/
    project
    "public"
    my repo
    5ec
    e4a
    4a7
    ce0 master
    public/master
    5ec
    e4a
    4a7
    ce0
    5ec
    e4a
    4a7
    ce0
    developer
    nick
    c12
    ec5
    24f
    5ec
    e4a
    4a7
    ce0
    developer
    jessica
    2fb
    df7
    4ea
    a09
    git remote add jess git://github.com/jessica/project.git
    5ec
    e4a
    4a7
    ce0
    nickh/
    project
    c12
    ec5
    24f
    5ec
    e4a
    4a7
    ce0
    jessica/
    project
    2fb
    df7
    4ea
    a09
    "nick" "jess"
    git remote add jess git://github.com/jessica/project.git
    “jess”

    View Slide

  323. schacon/
    project
    "public"
    my repo
    5ec
    e4a
    4a7
    ce0 master
    public/master
    5ec
    e4a
    4a7
    ce0
    5ec
    e4a
    4a7
    ce0
    developer
    nick
    c12
    ec5
    24f
    5ec
    e4a
    4a7
    ce0
    developer
    jessica
    2fb
    df7
    4ea
    a09
    git remote add jess git://github.com/jessica/project.git
    5ec
    e4a
    4a7
    ce0
    nickh/
    project
    c12
    ec5
    24f
    5ec
    e4a
    4a7
    ce0
    jessica/
    project
    2fb
    df7
    4ea
    a09
    "nick" "jess"
    schacon/
    project
    "public"
    my repo
    5ec
    e4a
    4a7
    ce0 master
    public/master
    5ec
    e4a
    4a7
    ce0
    git fetch nick
    5ec
    c12
    5ec
    e4a
    4a7
    ce0
    jessica/
    project
    2fb
    df7
    4ea
    a09
    "jess"
    c12
    ec5
    24f nick/master
    git fetch nick

    View Slide

  324. schacon/
    project
    "public"
    my repo
    5ec
    e4a
    4a7
    ce0 master
    public/master
    5ec
    e4a
    4a7
    ce0
    5ec
    e4a
    4a7
    ce0
    developer
    nick
    c12
    ec5
    24f
    5ec
    e4a
    4a7
    ce0
    developer
    jessica
    2fb
    df7
    4ea
    a09
    git remote add jess git://github.com/jessica/project.git
    5ec
    e4a
    4a7
    ce0
    nickh/
    project
    c12
    ec5
    24f
    5ec
    e4a
    4a7
    ce0
    jessica/
    project
    2fb
    df7
    4ea
    a09
    "nick" "jess"
    schacon/
    project
    "public"
    my repo
    5ec
    e4a
    4a7
    ce0 master
    public/master
    5ec
    e4a
    4a7
    ce0
    5ec
    e4a
    4a7
    ce0
    developer
    nick
    c12
    ec5
    24f
    5ec
    e4a
    4a7
    ce0
    developer
    jessica
    2fb
    df7
    4ea
    a09
    git fetch nick
    5ec
    e4a
    4a7
    ce0
    nickh/
    project
    c12
    ec5
    24f
    5ec
    e4a
    4a7
    ce0
    jessica/
    project
    2fb
    df7
    4ea
    a09
    "nick" "jess"
    c12
    ec5
    24f nick/master
    git fetch nick

    View Slide

  325. schacon/
    project
    "public"
    my repo
    5ec
    e4a
    4a7
    ce0 master
    public/master
    5ec
    e4a
    4a7
    ce0
    5ec
    e4a
    4a7
    ce0
    developer
    nick
    c12
    ec5
    24f
    5ec
    e4a
    4a7
    ce0
    developer
    jessica
    2fb
    df7
    4ea
    a09
    git fetch nick
    5ec
    e4a
    4a7
    ce0
    nickh/
    project
    c12
    ec5
    24f
    5ec
    e4a
    4a7
    ce0
    jessica/
    project
    2fb
    df7
    4ea
    a09
    "nick" "jess"
    c12
    ec5
    24f nick/master

    View Slide

  326. schacon/
    project
    "public"
    my repo
    5ec
    e4a
    4a7
    ce0 master
    public/master
    5ec
    e4a
    4a7
    ce0
    5ec
    e4a
    4a7
    ce0
    developer
    nick
    c12
    ec5
    24f
    5ec
    e4a
    4a7
    ce0
    developer
    jessica
    2fb
    df7
    4ea
    a09
    git remote add jess git://github.com/jessica/project.git
    5ec
    e4a
    4a7
    ce0
    nickh/
    project
    c12
    ec5
    24f
    5ec
    e4a
    4a7
    ce0
    jessica/
    project
    2fb
    df7
    4ea
    a09
    "nick" "jess"
    git fetch jess
    schacon/
    project
    "public"
    my repo
    5ec
    e4a
    4a7
    ce0 master
    public/
    e4a
    git fetch jess
    e4a
    nickh/
    project
    c12
    ec5
    24f
    jessic
    proje
    "nick" "jess
    ec5
    24f nick/ma
    2fb
    df7
    4ea
    a09
    jess/ma
    c12
    schacon/
    project
    "public"
    my repo
    5ec
    e4a
    4a7
    ce0 master
    public/master
    5ec
    e4a
    4a7
    ce0
    5ec
    e4a
    4a7
    ce0
    developer
    nick
    c12
    ec5
    24f
    5ec
    e4a
    4a7
    ce0
    developer
    jessica
    2fb
    df7
    4ea
    a09
    git fetch nick
    5ec
    e4a
    4a7
    ce0
    nickh/
    project
    c12
    ec5
    24f
    5ec
    e4a
    4a7
    ce0
    jessica/
    project
    2fb
    df7
    4ea
    a09
    "nick" "jess"
    c12
    ec5
    24f nick/master

    View Slide

  327. schacon/
    project
    "public"
    my repo
    5ec
    e4a
    4a7
    ce0 master
    public/master
    5ec
    e4a
    4a7
    ce0
    5ec
    e4a
    4a7
    ce0
    developer
    nick
    c12
    ec5
    24f
    5ec
    e4a
    4a7
    ce0
    developer
    jessica
    2fb
    df7
    4ea
    a09
    git remote add jess git://github.com/jessica/project.git
    5ec
    e4a
    4a7
    ce0
    nickh/
    project
    c12
    ec5
    24f
    5ec
    e4a
    4a7
    ce0
    jessica/
    project
    2fb
    df7
    4ea
    a09
    "nick" "jess"
    git fetch jess
    schacon/
    project
    "public"
    my repo
    5ec
    e4a
    4a7
    ce0 master
    public/master
    5ec
    e4a
    4a7
    ce0
    5ec
    e4a
    4a7
    ce0
    developer
    nick
    c12
    ec5
    24f
    5ec
    e4a
    4a7
    ce0
    developer
    jessica
    2fb
    df7
    4ea
    a09
    git fetch jess
    5ec
    e4a
    4a7
    ce0
    nickh/
    project
    c12
    ec5
    24f
    5ec
    e4a
    4a7
    ce0
    jessica/
    project
    2fb
    df7
    4ea
    a09
    "nick" "jess"
    ec5
    24f nick/master
    2fb
    df7
    4ea
    a09
    jess/master
    c12
    schacon/
    project
    "public"
    my repo
    5ec
    e4a
    4a7
    ce0 master
    public/master
    5ec
    e4a
    4a7
    ce0
    5ec
    e4a
    4a7
    ce0
    developer
    nick
    c12
    ec5
    24f
    5ec
    e4a
    4a7
    ce0
    developer
    jessica
    2fb
    df7
    4ea
    a09
    git fetch nick
    5ec
    e4a
    4a7
    ce0
    nickh/
    project
    c12
    ec5
    24f
    5ec
    e4a
    4a7
    ce0
    jessica/
    project
    2fb
    df7
    4ea
    a09
    "nick" "jess"
    c12
    ec5
    24f nick/master

    View Slide

  328. schacon/
    project
    "public"
    my repo
    5ec
    e4a
    4a7
    ce0 master
    public/master
    5ec
    e4a
    4a7
    ce0
    5ec
    e4a
    4a7
    ce0
    developer
    nick
    c12
    ec5
    24f
    5ec
    e4a
    4a7
    ce0
    developer
    jessica
    2fb
    df7
    4ea
    a09
    git fetch jess
    5ec
    e4a
    4a7
    ce0
    nickh/
    project
    c12
    ec5
    24f
    5ec
    e4a
    4a7
    ce0
    jessica/
    project
    2fb
    df7
    4ea
    a09
    "nick" "jess"
    ec5
    24f nick/master
    2fb
    df7
    4ea
    a09
    jess/master
    c12

    View Slide

  329. schacon/
    project
    "public"
    my repo
    5ec
    e4a
    4a7
    ce0
    master
    public/master
    5ec
    e4a
    4a7
    ce0
    5ec
    e4a
    4a7
    ce0
    developer
    nick
    c12
    ec5
    24f
    5ec
    e4a
    4a7
    ce0
    developer
    jessica
    2fb
    df7
    4ea
    a09
    5ec
    e4a
    4a7
    ce0
    nickh/
    project
    c12
    ec5
    24f
    5ec
    e4a
    4a7
    ce0
    jessica/
    project
    2fb
    df7
    4ea
    a09
    "nick" "jess"
    ec5
    24f nick/master
    2fb
    df7
    4ea
    a09
    jess/master
    c12
    b3b
    c63
    git merge nick jess
    git merge nick/master jess/master

    View Slide

  330. schacon/
    project
    "public"
    my repo
    5ec
    e4a
    4a7
    ce0
    master
    public/master
    5ec
    e4a
    4a7
    ce0
    5ec
    e4a
    4a7
    ce0
    developer
    nick
    c12
    ec5
    24f
    5ec
    e4a
    4a7
    ce0
    developer
    jessica
    2fb
    df7
    4ea
    a09
    git push public
    5ec
    e4a
    4a7
    ce0
    nickh/
    project
    c12
    ec5
    24f
    5ec
    e4a
    4a7
    ce0
    jessica/
    project
    2fb
    df7
    4ea
    a09
    "nick" "jess"
    ec5
    24f nick/master
    2fb
    df7
    4ea
    a09
    jess/master
    c12
    b3b
    c63
    e4a
    ec5
    24f
    2fb
    df7
    4ea
    a09
    c12
    b3b
    c63

    View Slide

  331. schacon/
    project
    "public"
    my repo
    5ec
    e4a
    4a7
    ce0
    master
    public/master
    5ec
    e4a
    4a7
    ce0
    5ec
    e4a
    4a7
    ce0
    developer
    nick
    c12
    ec5
    24f
    5ec
    e4a
    4a7
    ce0
    developer
    jessica
    2fb
    df7
    4ea
    a09
    5ec
    e4a
    4a7
    ce0
    nickh/
    project
    c12
    ec5
    24f
    5ec
    e4a
    4a7
    ce0
    jessica/
    project
    2fb
    df7
    4ea
    a09
    "nick" "jess"
    ec5
    24f nick/master
    2fb
    df7
    4ea
    a09
    jess/master
    c12
    b3b
    c63
    e4a
    ec5
    24f
    2fb
    df7
    4ea
    a09
    c12
    b3b
    c63

    View Slide

  332. schacon/
    project
    "public"
    my repo
    5ec
    e4a
    4a7
    ce0
    master
    public/master
    5ec
    e4a
    4a7
    ce0
    5ec
    e4a
    4a7
    ce0
    developer
    nick
    c12
    ec5
    24f
    5ec
    e4a
    4a7
    ce0
    developer
    jessica
    2fb
    df7
    4ea
    a09
    5ec
    e4a
    4a7
    ce0
    nickh/
    project
    c12
    ec5
    24f
    5ec
    e4a
    4a7
    ce0
    jessica/
    project
    2fb
    df7
    4ea
    a09
    "nick" "jess"
    ec5
    24f nick/master
    2fb
    df7
    4ea
    a09
    jess/master
    c12
    b3b
    c63
    e4a
    ec5
    24f
    2fb
    df7
    4ea
    a09
    c12
    b3b
    c63

    View Slide

  333. schacon/
    project
    "public"
    my repo
    5ec
    e4a
    4a7
    ce0
    master
    public/master
    5ec
    e4a
    4a7
    ce0
    5ec
    e4a
    4a7
    ce0
    developer
    nick
    c12
    ec5
    24f
    5ec
    e4a
    4a7
    ce0
    developer
    jessica
    2fb
    df7
    4ea
    a09
    5ec
    e4a
    4a7
    ce0
    nickh/
    project
    c12
    ec5
    24f
    5ec
    e4a
    4a7
    ce0
    jessica/
    project
    2fb
    df7
    4ea
    a09
    "nick" "jess"
    ec5
    24f nick/master
    2fb
    df7
    4ea
    a09
    jess/master
    c12
    b3b
    c63
    e4a
    ec5
    24f
    2fb
    df7
    4ea
    a09
    c12
    b3b
    c63

    View Slide

  334. schacon/
    project
    "public"
    my repo
    5ec
    e4a
    4a7
    ce0
    master
    public/master
    5ec
    e4a
    4a7
    ce0
    5ec
    e4a
    4a7
    ce0
    developer
    nick
    c12
    ec5
    24f
    5ec
    e4a
    4a7
    ce0
    developer
    jessica
    2fb
    df7
    4ea
    a09
    5ec
    e4a
    4a7
    ce0
    nickh/
    project
    c12
    ec5
    24f
    5ec
    e4a
    4a7
    ce0
    jessica/
    project
    2fb
    df7
    4ea
    a09
    "nick" "jess"
    ec5
    24f nick/master
    2fb
    df7
    4ea
    a09
    jess/master
    c12
    b3b
    c63
    e4a
    ec5
    24f
    2fb
    df7
    4ea
    a09
    c12
    b3b
    c63

    View Slide

  335. Looking Around

    View Slide

  336. git log

    View Slide

  337. walking your commit
    history

    View Slide

  338. 98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    95c41
    4fa23
    79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e

    View Slide

  339. git log
    98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    95c41
    4fa23
    79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e

    View Slide

  340. git log
    98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    95c41
    4fa23
    79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e

    View Slide

  341. git log
    98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    95c41
    4fa23
    79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e

    View Slide

  342. git log
    98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    95c41
    4fa23
    79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e

    View Slide

  343. git log
    98ca9
    a23fe
    f30ab
    iss53
    34ac2
    3acd1
    master
    HEAD
    i18n
    95c41
    4fa23
    79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e

    View Slide

  344. 79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e
    $ git log
    commit 16758d868a4e97c9d4281940438b7ea1680cfc0a
    Merge: 5eea9cf 4b2a7ae
    Author: Scott Chacon
    Date: Wed Jul 28 16:29:23 2010 -0700
    Merge branch 'i18n'
    commit 4b2a7ae83bcbb213c7d88c6fada3700f77d43a2e
    Author: Scott Chacon
    Date: Wed Jul 28 16:28:45 2010 -0700
    fix spacing issues in both c files
    commit 1d6389c30cf766daf3dcfe7cc1e3b7fdbfc5cc48
    Author: Scott Chacon
    Date: Wed Jul 28 16:28:18 2010 -0700
    added i18n file
    commit 5eea9cf450d5b200d7f134e4024d1c062cb5b341
    Author: Scott Chacon
    Date: Wed Jul 28 16:27:35 2010 -0700
    documented issue file
    commit 4db9f5c2b4c3935ff787f0fa85e9265c3e306fca
    Author: Scott Chacon
    Date: Wed Jul 28 16:27:10 2010 -0700
    added issue file

    View Slide

  345. 79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e
    $ git log
    commit 16758d868a4e97c9d4281940438b7ea1680cfc0a
    Merge: 5eea9cf 4b2a7ae
    Author: Scott Chacon
    Date: Wed Jul 28 16:29:23 2010 -0700
    Merge branch 'i18n'
    commit 4b2a7ae83bcbb213c7d88c6fada3700f77d43a2e
    Author: Scott Chacon
    Date: Wed Jul 28 16:28:45 2010 -0700
    fix spacing issues in both c files
    commit 1d6389c30cf766daf3dcfe7cc1e3b7fdbfc5cc48
    Author: Scott Chacon
    Date: Wed Jul 28 16:28:18 2010 -0700
    added i18n file
    commit 5eea9cf450d5b200d7f134e4024d1c062cb5b341
    Author: Scott Chacon
    Date: Wed Jul 28 16:27:35 2010 -0700
    documented issue file
    commit 4db9f5c2b4c3935ff787f0fa85e9265c3e306fca
    Author: Scott Chacon
    Date: Wed Jul 28 16:27:10 2010 -0700
    added issue file

    View Slide

  346. 79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e
    $ git log
    commit 16758d868a4e97c9d4281940438b7ea1680cfc0a
    Merge: 5eea9cf 4b2a7ae
    Author: Scott Chacon
    Date: Wed Jul 28 16:29:23 2010 -0700
    Merge branch 'i18n'
    commit 4b2a7ae83bcbb213c7d88c6fada3700f77d43a2e
    Author: Scott Chacon
    Date: Wed Jul 28 16:28:45 2010 -0700
    fix spacing issues in both c files
    commit 1d6389c30cf766daf3dcfe7cc1e3b7fdbfc5cc48
    Author: Scott Chacon
    Date: Wed Jul 28 16:28:18 2010 -0700
    added i18n file
    commit 5eea9cf450d5b200d7f134e4024d1c062cb5b341
    Author: Scott Chacon
    Date: Wed Jul 28 16:27:35 2010 -0700
    documented issue file
    commit 4db9f5c2b4c3935ff787f0fa85e9265c3e306fca
    Author: Scott Chacon
    Date: Wed Jul 28 16:27:10 2010 -0700
    added issue file

    View Slide

  347. 79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e
    $ git log
    commit 16758d868a4e97c9d4281940438b7ea1680cfc0a
    Merge: 5eea9cf 4b2a7ae
    Author: Scott Chacon
    Date: Wed Jul 28 16:29:23 2010 -0700
    Merge branch 'i18n'
    commit 4b2a7ae83bcbb213c7d88c6fada3700f77d43a2e
    Author: Scott Chacon
    Date: Wed Jul 28 16:28:45 2010 -0700
    fix spacing issues in both c files
    commit 1d6389c30cf766daf3dcfe7cc1e3b7fdbfc5cc48
    Author: Scott Chacon
    Date: Wed Jul 28 16:28:18 2010 -0700
    added i18n file
    commit 5eea9cf450d5b200d7f134e4024d1c062cb5b341
    Author: Scott Chacon
    Date: Wed Jul 28 16:27:35 2010 -0700
    documented issue file
    commit 4db9f5c2b4c3935ff787f0fa85e9265c3e306fca
    Author: Scott Chacon
    Date: Wed Jul 28 16:27:10 2010 -0700
    added issue file

    View Slide

  348. 79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e
    $ git log
    commit 16758d868a4e97c9d4281940438b7ea1680cfc0a
    Merge: 5eea9cf 4b2a7ae
    Author: Scott Chacon
    Date: Wed Jul 28 16:29:23 2010 -0700
    Merge branch 'i18n'
    commit 4b2a7ae83bcbb213c7d88c6fada3700f77d43a2e
    Author: Scott Chacon
    Date: Wed Jul 28 16:28:45 2010 -0700
    fix spacing issues in both c files
    commit 1d6389c30cf766daf3dcfe7cc1e3b7fdbfc5cc48
    Author: Scott Chacon
    Date: Wed Jul 28 16:28:18 2010 -0700
    added i18n file
    commit 5eea9cf450d5b200d7f134e4024d1c062cb5b341
    Author: Scott Chacon
    Date: Wed Jul 28 16:27:35 2010 -0700
    documented issue file
    commit 4db9f5c2b4c3935ff787f0fa85e9265c3e306fca
    Author: Scott Chacon
    Date: Wed Jul 28 16:27:10 2010 -0700
    added issue file

    View Slide

  349. 79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e
    $ git log
    commit 16758d868a4e97c9d4281940438b7ea1680cfc0a
    Merge: 5eea9cf 4b2a7ae
    Author: Scott Chacon
    Date: Wed Jul 28 16:29:23 2010 -0700
    Merge branch 'i18n'
    commit 4b2a7ae83bcbb213c7d88c6fada3700f77d43a2e
    Author: Scott Chacon
    Date: Wed Jul 28 16:28:45 2010 -0700
    fix spacing issues in both c files
    commit 1d6389c30cf766daf3dcfe7cc1e3b7fdbfc5cc48
    Author: Scott Chacon
    Date: Wed Jul 28 16:28:18 2010 -0700
    added i18n file
    commit 5eea9cf450d5b200d7f134e4024d1c062cb5b341
    Author: Scott Chacon
    Date: Wed Jul 28 16:27:35 2010 -0700
    documented issue file
    commit 4db9f5c2b4c3935ff787f0fa85e9265c3e306fca
    Author: Scott Chacon
    Date: Wed Jul 28 16:27:10 2010 -0700
    added issue file

    View Slide

  350. 79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e
    $ git log
    commit 16758d868a4e97c9d4281940438b7ea1680cfc0a
    Merge: 5eea9cf 4b2a7ae
    Author: Scott Chacon
    Date: Wed Jul 28 16:29:23 2010 -0700
    Merge branch 'i18n'
    commit 4b2a7ae83bcbb213c7d88c6fada3700f77d43a2e
    Author: Scott Chacon
    Date: Wed Jul 28 16:28:45 2010 -0700
    fix spacing issues in both c files
    commit 1d6389c30cf766daf3dcfe7cc1e3b7fdbfc5cc48
    Author: Scott Chacon
    Date: Wed Jul 28 16:28:18 2010 -0700
    added i18n file
    commit 5eea9cf450d5b200d7f134e4024d1c062cb5b341
    Author: Scott Chacon
    Date: Wed Jul 28 16:27:35 2010 -0700
    documented issue file
    commit 4db9f5c2b4c3935ff787f0fa85e9265c3e306fca
    Author: Scott Chacon
    Date: Wed Jul 28 16:27:10 2010 -0700
    added issue file

    View Slide

  351. 79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e
    $ git log
    commit 16758d868a4e97c9d4281940438b7ea1680cfc0a
    Merge: 5eea9cf 4b2a7ae
    Author: Scott Chacon
    Date: Wed Jul 28 16:29:23 2010 -0700
    Merge branch 'i18n'
    commit 4b2a7ae83bcbb213c7d88c6fada3700f77d43a2e
    Author: Scott Chacon
    Date: Wed Jul 28 16:28:45 2010 -0700
    fix spacing issues in both c files
    commit 1d6389c30cf766daf3dcfe7cc1e3b7fdbfc5cc48
    Author: Scott Chacon
    Date: Wed Jul 28 16:28:18 2010 -0700
    added i18n file
    commit 5eea9cf450d5b200d7f134e4024d1c062cb5b341
    Author: Scott Chacon
    Date: Wed Jul 28 16:27:35 2010 -0700
    documented issue file
    commit 4db9f5c2b4c3935ff787f0fa85e9265c3e306fca
    Author: Scott Chacon
    Date: Wed Jul 28 16:27:10 2010 -0700
    added issue file

    View Slide

  352. 79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e
    $ git log
    commit 16758d868a4e97c9d4281940438b7ea1680cfc0a
    Merge: 5eea9cf 4b2a7ae
    Author: Scott Chacon
    Date: Wed Jul 28 16:29:23 2010 -0700
    Merge branch 'i18n'
    commit 4b2a7ae83bcbb213c7d88c6fada3700f77d43a2e
    Author: Scott Chacon
    Date: Wed Jul 28 16:28:45 2010 -0700
    fix spacing issues in both c files
    commit 1d6389c30cf766daf3dcfe7cc1e3b7fdbfc5cc48
    Author: Scott Chacon
    Date: Wed Jul 28 16:28:18 2010 -0700
    added i18n file
    commit 5eea9cf450d5b200d7f134e4024d1c062cb5b341
    Author: Scott Chacon
    Date: Wed Jul 28 16:27:35 2010 -0700
    documented issue file
    commit 4db9f5c2b4c3935ff787f0fa85e9265c3e306fca
    Author: Scott Chacon
    Date: Wed Jul 28 16:27:10 2010 -0700
    added issue file

    View Slide

  353. 79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e
    $ git log
    commit 16758d868a4e97c9d4281940438b7ea1680cfc0a
    Merge: 5eea9cf 4b2a7ae
    Author: Scott Chacon
    Date: Wed Jul 28 16:29:23 2010 -0700
    Merge branch 'i18n'
    commit 4b2a7ae83bcbb213c7d88c6fada3700f77d43a2e
    Author: Scott Chacon
    Date: Wed Jul 28 16:28:45 2010 -0700
    fix spacing issues in both c files
    commit 1d6389c30cf766daf3dcfe7cc1e3b7fdbfc5cc48
    Author: Scott Chacon
    Date: Wed Jul 28 16:28:18 2010 -0700
    added i18n file
    commit 5eea9cf450d5b200d7f134e4024d1c062cb5b341
    Author: Scott Chacon
    Date: Wed Jul 28 16:27:35 2010 -0700
    documented issue file
    commit 4db9f5c2b4c3935ff787f0fa85e9265c3e306fca
    Author: Scott Chacon
    Date: Wed Jul 28 16:27:10 2010 -0700
    added issue file

    View Slide

  354. 79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e
    $ git log
    commit 16758d868a4e97c9d4281940438b7ea1680cfc0a
    Merge: 5eea9cf 4b2a7ae
    Author: Scott Chacon
    Date: Wed Jul 28 16:29:23 2010 -0700
    Merge branch 'i18n'
    commit 4b2a7ae83bcbb213c7d88c6fada3700f77d43a2e
    Author: Scott Chacon
    Date: Wed Jul 28 16:28:45 2010 -0700
    fix spacing issues in both c files
    commit 1d6389c30cf766daf3dcfe7cc1e3b7fdbfc5cc48
    Author: Scott Chacon
    Date: Wed Jul 28 16:28:18 2010 -0700
    added i18n file
    commit 5eea9cf450d5b200d7f134e4024d1c062cb5b341
    Author: Scott Chacon
    Date: Wed Jul 28 16:27:35 2010 -0700
    documented issue file
    commit 4db9f5c2b4c3935ff787f0fa85e9265c3e306fca
    Author: Scott Chacon
    Date: Wed Jul 28 16:27:10 2010 -0700
    added issue file

    View Slide

  355. 79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e
    $ git log
    commit 16758d868a4e97c9d4281940438b7ea1680cfc0a
    Merge: 5eea9cf 4b2a7ae
    Author: Scott Chacon
    Date: Wed Jul 28 16:29:23 2010 -0700
    Merge branch 'i18n'
    commit 4b2a7ae83bcbb213c7d88c6fada3700f77d43a2e
    Author: Scott Chacon
    Date: Wed Jul 28 16:28:45 2010 -0700
    fix spacing issues in both c files
    commit 1d6389c30cf766daf3dcfe7cc1e3b7fdbfc5cc48
    Author: Scott Chacon
    Date: Wed Jul 28 16:28:18 2010 -0700
    added i18n file
    commit 5eea9cf450d5b200d7f134e4024d1c062cb5b341
    Author: Scott Chacon
    Date: Wed Jul 28 16:27:35 2010 -0700
    documented issue file
    commit 4db9f5c2b4c3935ff787f0fa85e9265c3e306fca
    Author: Scott Chacon
    Date: Wed Jul 28 16:27:10 2010 -0700
    added issue file

    View Slide

  356. 79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e
    $ git log
    commit 16758d868a4e97c9d4281940438b7ea1680cfc0a
    Merge: 5eea9cf 4b2a7ae
    Author: Scott Chacon
    Date: Wed Jul 28 16:29:23 2010 -0700
    Merge branch 'i18n'
    commit 4b2a7ae83bcbb213c7d88c6fada3700f77d43a2e
    Author: Scott Chacon
    Date: Wed Jul 28 16:28:45 2010 -0700
    fix spacing issues in both c files
    commit 1d6389c30cf766daf3dcfe7cc1e3b7fdbfc5cc48
    Author: Scott Chacon
    Date: Wed Jul 28 16:28:18 2010 -0700
    added i18n file
    commit 5eea9cf450d5b200d7f134e4024d1c062cb5b341
    Author: Scott Chacon
    Date: Wed Jul 28 16:27:35 2010 -0700
    documented issue file
    commit 4db9f5c2b4c3935ff787f0fa85e9265c3e306fca
    Author: Scott Chacon
    Date: Wed Jul 28 16:27:10 2010 -0700
    added issue file

    View Slide

  357. log formatting

    View Slide

  358. git log --oneline

    View Slide

  359. 79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e

    View Slide

  360. 79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e
    $ git log --oneline
    16758d8 Merge branch 'i18n'
    4b2a7ae fix spacing issues in both c files
    1d6389c added i18n file
    5eea9cf documented issue file
    4db9f5c added issue file
    79c2add initial project import

    View Slide

  361. 79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e
    $ git log --oneline iss53
    5eea9cf documented issue file
    4db9f5c added issue file
    79c2add initial project import

    View Slide

  362. 79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e
    $ git log --oneline i18n
    faf4ece update README to be more specific
    4b2a7ae fix spacing issues in both c files
    1d6389c added i18n file
    79c2add initial project import

    View Slide

  363. git log --graph

    View Slide

  364. 79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e
    $ git log --oneline
    16758d8 Merge branch 'i18n'
    4b2a7ae fix spacing issues in both c files
    1d6389c added i18n file
    5eea9cf documented issue file
    4db9f5c added issue file
    79c2add initial project import

    View Slide

  365. 79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e
    $ git log --oneline --graph
    * 16758d8 Merge branch 'i18n'
    |\
    | * 4b2a7ae fix spacing issues in both c files
    | * 1d6389c added i18n file
    * | 5eea9cf documented issue file
    * | 4db9f5c added issue file
    |/
    * 79c2add initial project import

    View Slide

  366. 79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e
    $ git log --oneline --graph
    * 16758d8 Merge branch 'i18n'
    |\
    | * 4b2a7ae fix spacing issues in both c files
    | * 1d6389c added i18n file
    * | 5eea9cf documented issue file
    * | 4db9f5c added issue file
    |/
    * 79c2add initial project import

    View Slide

  367. 79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e
    $ git log --oneline --graph
    * 16758d8 Merge branch 'i18n'
    |\
    | * 4b2a7ae fix spacing issues in both c files
    | * 1d6389c added i18n file
    * | 5eea9cf documented issue file
    * | 4db9f5c added issue file
    |/
    * 79c2add initial project import

    View Slide

  368. 79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e
    $ git log --oneline --graph
    * 16758d8 Merge branch 'i18n'
    |\
    | * 4b2a7ae fix spacing issues in both c files
    | * 1d6389c added i18n file
    * | 5eea9cf documented issue file
    * | 4db9f5c added issue file
    |/
    * 79c2add initial project import

    View Slide

  369. 79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e
    $ git log --oneline --graph
    * 16758d8 Merge branch 'i18n'
    |\
    | * 4b2a7ae fix spacing issues in both c files
    | * 1d6389c added i18n file
    * | 5eea9cf documented issue file
    * | 4db9f5c added issue file
    |/
    * 79c2add initial project import

    View Slide

  370. 79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e
    $ git log --oneline --graph
    * 16758d8 Merge branch 'i18n'
    |\
    | * 4b2a7ae fix spacing issues in both c files
    | * 1d6389c added i18n file
    * | 5eea9cf documented issue file
    * | 4db9f5c added issue file
    |/
    * 79c2add initial project import

    View Slide

  371. 79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e
    $ git log --oneline --graph
    * 16758d8 Merge branch 'i18n'
    |\
    | * 4b2a7ae fix spacing issues in both c files
    | * 1d6389c added i18n file
    * | 5eea9cf documented issue file
    * | 4db9f5c added issue file
    |/
    * 79c2add initial project import

    View Slide

  372. git log --all
    git log --decorate

    View Slide

  373. 79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e
    $ git log --oneline --graph --all --decorate
    * faf4ece (i18n) update README to be more specific
    | * 16758d8 (HEAD, master) Merge branch 'i18n'
    | |\
    | |/
    |/|
    * | 4b2a7ae fix spacing issues in both c files
    * | 1d6389c added i18n file
    | * 5eea9cf (iss53) documented issue file
    | * 4db9f5c added issue file
    |/
    * 79c2add initial project import

    View Slide

  374. 79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e
    $ git log --oneline --graph --all --decorate
    * faf4ece (i18n) update README to be more specific
    | * 16758d8 (HEAD, master) Merge branch 'i18n'
    | |\
    | |/
    |/|
    * | 4b2a7ae fix spacing issues in both c files
    * | 1d6389c added i18n file
    | * 5eea9cf (iss53) documented issue file
    | * 4db9f5c added issue file
    |/
    * 79c2add initial project import

    View Slide

  375. git config --global
    alias.lol “log --oneline --graph --decorate”

    View Slide

  376. git config --global
    alias.lol “log --oneline --graph --decorate”
    git lol

    View Slide

  377. git config --global
    alias.lol “log --oneline --graph --decorate”
    git lol

    View Slide

  378. 79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e
    $ git lol --all
    * faf4ece (i18n) update README to be more specific
    | * 16758d8 (HEAD, master) Merge branch 'i18n'
    | |\
    | |/
    |/|
    * | 4b2a7ae fix spacing issues in both c files
    * | 1d6389c added i18n file
    | * 5eea9cf (iss53) documented issue file
    | * 4db9f5c added issue file
    |/
    * 79c2add initial project import

    View Slide

  379. log subsets

    View Slide

  380. git log branchA ^branchB

    View Slide

  381. git log branchA ^branchB
    show me commits reachable by branchA
    that are not reachable by branchB

    View Slide

  382. git log branchA ^branchB

    View Slide

  383. git log branchA ^branchB
    not reachable

    View Slide

  384. 79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e

    View Slide

  385. 79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e
    iss53 ^i18n

    View Slide

  386. 79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e
    iss53 ^i18n

    View Slide

  387. 79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e
    iss53 ^i18n

    View Slide

  388. 79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e
    iss53 ^i18n

    View Slide

  389. 79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e
    iss53 ^i18n

    View Slide

  390. 79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e
    iss53 ^i18n

    View Slide

  391. 79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e
    $ git lol iss53 ^i18n
    * 5eea9cf (iss53) documented issue file
    * 4db9f5c added issue file

    View Slide

  392. what work is in our i18n
    branch that is not
    merged into master yet?

    View Slide

  393. 79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e
    i18n ^master

    View Slide

  394. 79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e
    i18n ^master

    View Slide

  395. 79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e
    i18n ^master

    View Slide

  396. 79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e
    i18n ^master

    View Slide

  397. 79c2a
    1d638
    5eea9
    iss53
    4db9f
    4b2a7
    master
    HEAD
    i18n
    16758
    faf4e
    $ git log i18n ^master
    commit faf4ecee82715967b07ff98e88796a311c8761fe
    Author: Scott Chacon
    Date: Wed Jul 28 16:30:00 2010 -0700
    update README to be more specific
    $

    View Slide

  398. quiz

    View Slide

  399. git log origin/master ^master

    View Slide

  400. git log master ^origin/master

    View Slide

  401. Review

    View Slide

  402. Review
    git init

    View Slide

  403. Review
    git init
    git clone

    View Slide

  404. Review
    git init
    git clone
    git add

    View Slide

  405. Review
    git init
    git clone
    git add
    git status

    View Slide

  406. Review
    git init
    git clone
    git add
    git status
    git commit

    View Slide

  407. Review
    git init
    git clone
    git add
    git status
    git commit
    git branch

    View Slide

  408. Review
    git init
    git clone
    git add
    git status
    git commit
    git branch
    git checkout

    View Slide

  409. Review
    git init
    git clone
    git add
    git status
    git commit
    git branch
    git checkout
    git merge

    View Slide

  410. Review
    git init
    git clone
    git add
    git status
    git commit
    git branch
    git checkout
    git merge
    git push

    View Slide

  411. Review
    git init
    git clone
    git add
    git status
    git commit
    git branch
    git checkout
    git merge
    git push
    git fetch

    View Slide

  412. Review
    git init
    git clone
    git add
    git status
    git commit
    git branch
    git checkout
    git merge
    git push
    git fetch
    git pull

    View Slide

  413. Review
    git init
    git clone
    git add
    git status
    git commit
    git branch
    git checkout
    git merge
    git push
    git fetch
    git pull
    git log

    View Slide

  414. Review
    git init
    git clone
    git add
    git status
    git commit
    git branch
    git checkout
    git merge
    git push
    git fetch
    git pull
    git log
    12

    View Slide

  415. Resources
    git-scm.com
    gitref.org
    progit.com
    [email protected]

    View Slide