SlideShare a Scribd company logo
1 of 292
Download to read offline
Git going
         with      DVCS
                mental spoo n bending
90 minutes of
      v ia source c ode control



                           by Matthew McCullough of Ambient Ideas, LLC
DVCS
What?     Why?

          Basic Use




DVCS
What?     Why?

          Basic Use




                       Whoā€™s       Theory
DVCS                  Using Git?
                             Deeper
                              Use
What?        Why?

              Basic Use




                           Whoā€™s       Theory
DVCS                      Using Git?
                                 Deeper
                                  Use




         Usage Models

       GUIs     High Points
ā€œ   Git
    -noun                    sant or
            Slang. an unplea
    British
    cont  emptible  per son     ā€ ionar y
                      -Oxfo rd English Dict
contrasts
otistical bastard, and
ā€œ
I'm an eg
    I name all my projects
    after myself. Fi rst Linux,


    now   git. ā€
                     -Lin us Torvalds
otistical bastard, and
ā€œ
I'm an eg
    I name all my projects
    after myself. Fi rst Linux,


    now   git. ā€
                     -Lin us Torvalds
RCS

Folders
Clear
           Source   Case
            Safe
                    CVS
           PVCS
     RCS

Folders
Subversion
                            BitKeeper

                                  Perforce
                    Clear
           Source   Case
            Safe
                    CVS
           PVCS
     RCS

Folders
darcs
                                                     Mercurial


                                                           Bazaar

                                        Subversion
                            BitKeeper

                                  Perforce
                    Clear
           Source   Case
            Safe
                    CVS
           PVCS
     RCS

Folders
t
Source Code Control
Gi
Gi
Source Code Control

     t
CultureChange
Centralized
      VCS     =Donā€™t
Centralized
      VCS     =Donā€™t
Distributed
   VCS        = Whatever!
                   Do
Innovate
Experiment
Safely Be Wrong
Drive-by Assist
Crowd Source
Crowd Source
Crowd Source
Just show it to me!
No, not on that!
Download binaries
Git Distro Sources
      Win Cygwin
      Win msysGit
Git Distro Sources
      Win Cygwin
      Win msysGit
      Linux Source
      Linux Package manager
Git Distro Sources
      Win Cygwin
      Win msysGit
      Linux Source
      Linux Package manager
      Mac MacPorts
      Mac git-osx-installer
Git Distro Sources
      Win Cygwin
      Win msysGit
      Linux Source
      Linux Package manager
      Mac MacPorts
      Mac git-osx-installer
      Any JGit
Put it in your path
Identify yourself
Global Git Settings


git conļ¬g --global user.name quot;Hal Smithquot;

git conļ¬g --global user.email quot;hal@bnl.comquot;
Global Git Settings


 git conļ¬g --list
Global Git Settings


 git conļ¬g --list
                 t va lues
        t cu rren
  Outpu
Use it!
Creating a Repo

mkdir myproj.git
Creating a Repo

mkdir myproj.git
cd myproj.git
Creating a Repo

mkdir myproj.git
cd myproj.git
git init
Creating a Repo


       !
mkdir myproj.git


D O N E
cd myproj.git
git init
Thanks
for attending!
Knobs and Dials
145+ Commands
What?        Why?

              Basic Use




                           Whoā€™s       Theory
DVCS                      Using Git?
                                 Deeper
                                  Use




         Usage Models

       GUIs     High Points
Whoā€™s Got   Git?
Follow the
      DOTS
Symmetric
Symmetric
Distributed
pu
  sh
pu
  sh
push
push
pull
pull
Distributed
Hashes and
      Integrity
Index vs Hash

ā€£ Centralized VCS uses DB
  sequential index.

ā€£ Git uses SHA-1 hash.
SHA-1 Hash
ā€£ Hash for the sake of integrity.
ā€£ Keep the source of the hash.
SHA-1 Hash
ā€£ Hash for the sake of integrity.
ā€£ Keep the source of the hash.

                             ught
                       I tho ere
                           es w
                      hash r
                            fo
                            swo rds?
                        pas
Centralized VCS
Alice   Bob
Alice        Bob
1 = okay.htm
Alice        Bob
1 = okay.htm

2 = ļ¬ne.htm
Alice                  Bob
1 = okay.htm

2 = ļ¬ne.htm    svnsync
Alice                    Bob
1 = okay.htm             1 = okay.htm

2 = ļ¬ne.htm    svnsync   2 = ļ¬ne.htm
Alice                     Bob
1 = okay.htm             1 = okay.htm

2 = ļ¬ne.htm    svnsync   2 = ļ¬ne.htm

                         3 = good.htm
Alice                      Bob
1 = okay.htm              1 = okay.htm

2 = ļ¬ne.htm     svnsync   2 = ļ¬ne.htm

                          3 = good.htm

3 = great.htm
Alice                      Bob
1 = okay.htm              1 = okay.htm

2 = ļ¬ne.htm     svnsync   2 = ļ¬ne.htm

                          3 = good.htm

3 = great.htm   svnsync
Alice                      Bob
1 = okay.htm              1 = okay.htm

2 = ļ¬ne.htm     svnsync   2 = ļ¬ne.htm

4 = good.htm              3 = good.htm

3 = great.htm   svnsync   4 = great.htm
Alice                      Bob
 1 = okay.htm              1 = okay.htm

 2 = ļ¬ne.htm     svnsync   2 = ļ¬ne.htm


ERROR
 4 = good.htm              3 = good.htm

 3 = great.htm         ERROR
                 svnsync   4 = great.htm
Distributed VCS
Alice   Bob
Alice            Bob
a233b76 = okay.htm
Alice            Bob
a233b76 = okay.htm

d234ab1 = ļ¬ne.htm
Alice                   Bob
a233b76 = okay.htm

d234ab1 = ļ¬ne.htm    Sync
Alice                        Bob
a233b76 = okay.htm          a233b76 = okay.htm

d234ab1 = ļ¬ne.htm    Sync   d234ab1 = ļ¬ne.htm
Alice                        Bob
a233b76 = okay.htm          a233b76 = okay.htm

d234ab1 = ļ¬ne.htm    Sync   d234ab1 = ļ¬ne.htm

                            f90b12c = good.htm
Alice                        Bob
a233b76 = okay.htm           a233b76 = okay.htm

d234ab1 = ļ¬ne.htm     Sync   d234ab1 = ļ¬ne.htm

                             f90b12c = good.htm

ae42ba0 = great.htm
Alice                        Bob
a233b76 = okay.htm           a233b76 = okay.htm

d234ab1 = ļ¬ne.htm     Sync   d234ab1 = ļ¬ne.htm

                             f90b12c = good.htm

ae42ba0 = great.htm   Sync
Alice                        Bob
a233b76 = okay.htm           a233b76 = okay.htm

d234ab1 = ļ¬ne.htm     Sync   d234ab1 = ļ¬ne.htm

f90b12c = good.htm           f90b12c = good.htm

ae42ba0 = great.htm   Sync   ae42ba0 = great.htm
Hashable Objects

ā€£ Blob
ā€£ Tree
ā€£ Commit
ā€£ Tag
http://book.git-scm.com/1_the_git_object_model.html
http://book.git-scm.com/1_the_git_object_model.html
http://book.git-scm.com/1_the_git_object_model.html
http://book.git-scm.com/1_the_git_object_model.html
Hash Benefits

Independence
ā€£ Time & location separation from sequence # of
  checkin.
ā€£ Easy merging of repositories
ā€£ Easy identiļ¬cation of what needs to be synced
Hash Benefits

Integrity
ā€£ Identiļ¬es damaged repos.
ā€£ Prevents modiļ¬cation of published history.
ā€£ Unique to ļ¬le size and contents.
Hash Benefits

Tags
ā€£ Cryptographically sign tags by GPG.
ā€£ Guaranteeing the repoā€™s state at a point
  in time.
Location,Location,Location
Single Stage Thinking
      of Subversion
Subversion
ā€£   svn commit
ā€£   Adds everything modiļ¬ed.
ā€£   ā€œcommittedā€ locally and on the server.
ā€£   Must list if you want speciļ¬c ļ¬les.
ā€£   What if you check in your password?
$ echo //COMMENTS >> Matt1.java
$ echo //THOUGHTS >> Matt2.java
$ echo //COMMENTS >> Matt1.java
$ echo //THOUGHTS >> Matt2.java

$ svn status
M      Matt1.java
M      Matt2.java
$ echo //COMMENTS >> Matt1.java
$ echo //THOUGHTS >> Matt2.java

$ svn status
M      Matt1.java
M      Matt2.java

$ svn commit -m'Matts checkin'
Adding         Matt1.java
Adding         Matt2.java
Transmitting file data .
Committed revision 2.
Three Stage Thinking
        of Git
Git
ā€£   git add
ā€£   git commit
ā€£   git push
ā€£   Commits only what is added to the index.
ā€£   Opportunity to change history locally.
ā€£   Selectively share with other repos.
repo
git clone git://somedomain/myproj.git   B uild
cd myproj.git
repo
git clone git://somedomain/myproj.git   B uild
cd myproj.git
                                  dex
                        pda te in
git checkout master   U
repo
git clone git://somedomain/myproj.git   B uild
cd myproj.git
                                  dex
                        pda te in
git checkout master   U

echo ā€˜//Commentsā€™ >> ClassOne.java         or king
echo ā€˜//Thoughtsā€™ >> ClassTwo.java E dit w
repo
git clone git://somedomain/myproj.git      B uild
cd myproj.git
                                    dex
                          pda te in
git checkout master     U

echo ā€˜//Commentsā€™ >> ClassOne.java         or king
echo ā€˜//Thoughtsā€™ >> ClassTwo.java E dit w

                              to i ndex
git add ClassOne.java     Add                    epo
                                        ave to r
git commit -mā€™Added     commentsā€™ S
repo
git clone git://somedomain/myproj.git       B uild
cd myproj.git
                                      dex
                            pda te in
git checkout master       U

echo ā€˜//Commentsā€™ >> ClassOne.java         or king
echo ā€˜//Thoughtsā€™ >> ClassTwo.java E dit w

                              to i ndex
git   add ClassOne.java   Add                    epo
                                        ave to r
git   commit -mā€™Added commentsā€™ S
                     st ash
git   stash Pus h to
Remote
        is like a special
Stash
                            Repo




                     Index
   Working
Remote
        is like a special
Stash
                            Repo




                     Index
   Working
Remote
        is like a special
Stash
                            Repo
                                   git clone




                     Index
   Working
Remote
        is like a special
Stash
                            Repo
                                   git clone
                                   git checkout




                     Index
   Working
Remote
        is like a special
Stash
                            Repo
                                   git clone
                                   git checkout
                                   edit experiment ļ¬les



                     Index
   Working
Remote
        is like a special
Stash
                            Repo
                                   git clone
                                   git checkout
                                   edit experiment ļ¬les
                                   git stash

                     Index
   Working
Remote
        is like a special
Stash
                            Repo
                                   git clone
                                   git checkout
                                   edit experiment ļ¬les
                                   git stash
                                   test buggy ļ¬les
                     Index
   Working
Remote
        is like a special
Stash
                            Repo
                                   git clone
                                   git checkout
                                   edit experiment ļ¬les
                                   git stash
                                   test buggy ļ¬les
                     Index         git stash apply
   Working
Remote
        is like a special
Stash
                            Repo
                                   git clone
                                   git checkout
                                   edit experiment ļ¬les
                                   git stash
                                   test buggy ļ¬les
                     Index         git stash apply
   Working                         git add
Remote
        is like a special
Stash
                            Repo
                                   git clone
                                   git checkout
                                   edit experiment ļ¬les
                                   git stash
                                   test buggy ļ¬les
                     Index         git stash apply
   Working                         git add
                                   git commit
Remote
        is like a special
Stash
                            Repo
                                   git clone
                                   git checkout
                                   edit experiment ļ¬les
                                   git stash
                                   test buggy ļ¬les
                     Index         git stash apply
   Working                         git add
                                   git commit
                                   git push
Remote
        is like a special
Stash
                            Repo
                                   git clone
                                   git checkout
                                   edit experiment ļ¬les
                                   git stash
                                   test buggy ļ¬les
                     Index         git stash apply
   Working                         git add
                                   git commit
                                   git push
What does this   buy me?
$ echo //MYD0GSNAM3 >> mattfile1.txt
$ echo //NewText2 >> mattfile2.txt
$ echo //MYD0GSNAM3 >> mattfile1.txt
$ echo //NewText2 >> mattfile2.txt

$ git status
# On branch master
# Changed but not updated:
#       modified:   mattfile1.txt
#       modified:   mattfile2.txt
$ echo //MYD0GSNAM3 >> mattfile1.txt
$ echo //NewText2 >> mattfile2.txt

$ git status
# On branch master
# Changed but not updated:
#       modified:   mattfile1.txt
#       modified:   mattfile2.txt
                                  o in dex
                              int
$ git add mattfile1.txt   Put
$ echo //MYD0GSNAM3 >> mattfile1.txt
$ echo //NewText2 >> mattfile2.txt

$ git status
# On branch master
# Changed but not updated:
#       modified:   mattfile1.txt
#       modified:   mattfile2.txt
                                  o in dex
                              int
$ git add mattfile1.txt   Put
                                          to r epo
                                    S ave
$ git commit -m'Matts pw checkin'
[master]: created ddcdf18: quot;Matts pw checkinquot;
 1 files changed, 1 insertions(+), 0 deletions(-)
#$%^&!
I just committed my password!
Change History
$ git reset --hard HEAD^
HEAD is now at 9de4cd3 First checkin

$ git log
commit 9de4cd3a3f24a3de3e804df84cc3321c7d0c9993
Author: Matthew McCullough
<matthewm@ambientideas.com>
Date:   Wed Mar 4 23:09:17 2009 -0700
    First checkin
Change History
                                              com mit
                                        the
                                w a way
$ git reset --hard HEAD^  T hro
HEAD is now at 9de4cd3 First checkin

$ git log
commit 9de4cd3a3f24a3de3e804df84cc3321c7d0c9993
Author: Matthew McCullough
<matthewm@ambientideas.com>
Date:   Wed Mar 4 23:09:17 2009 -0700
    First checkin
Change History
                                              com mit
                                        the
                                w a way
$ git reset --hard HEAD^  T hro
HEAD is now at 9de4cd3 First checkin

$ git log
commit 9de4cd3a3f24a3de3e804df84cc3321c7d0c9993
Author: Matthew McCullough
<matthewm@ambientideas.com>
Date:   Wed Mar 4 23:09:17 2009 -0700
    First checkin
Sharing
Serving It Up
          Protocols
           ā€£ GIT
           ā€£ SSH
             ā€£ SCP
           ā€£ Local ļ¬le system
             ā€£ SAMBA
           ā€£ HTTP
             ā€£ WebDAV
           ā€£ rsync
Serving It Up
Network
ā€£ git instaweb. Built in, read-only, HTTP.
ā€£ git daemon. Custom socket language.
ā€£ gitosis. Easy permissions control.
ā€£ github. Open source & private repos.
ā€£ ssh. OS controlled permissions.
Serving It Up

Filesystem
ā€£ Local folders. Yes, they can be ā€œremotes.ā€
ā€£ Mapped network drives. Just like folders.
aem on
git clone git://somehost.org/myproj.git   g it d
aem on
git clone git://somehost.org/myproj.git   g it d

git clone mccm06@somehost.org:myproj.git           SSH
aem on
git clone git://somehost.org/myproj.git    g it d

git clone mccm06@somehost.org:myproj.git            SSH

git clone http://somehost.org/myproj.git    H TTP
aem on
git clone git://somehost.org/myproj.git        g it d

git clone mccm06@somehost.org:myproj.git                SSH

git clone http://somehost.org/myproj.git        H TTP

                                     sys tem
git clone ~/work/myproj.git   File
aem on
git clone git://somehost.org/myproj.git        g it d

git clone mccm06@somehost.org:myproj.git                SSH

git clone http://somehost.org/myproj.git        H TTP

                                     sys tem
git clone ~/work/myproj.git   File
                                              rk d rive
                                       Ne two
git clone z:someservermyproj.git
Merge & Rebase
Cheap Branches
Cheap Branches
git show-branch --all
git branch -a

ā€£Local branch
 ā€£localbranchname
ā€£Remote
 ā€£remote/branchname
Merge Anything
Merge Anything
git merge --no-commit <sourcebranch>
git merge --squash <sourcebranch>
git merge <sourcebranch1> <sourcebranch2>


ā€£Selectable merge strategy
ā€£Octopus: More than one
ā€£Review before committing
ā€£Flatten micro-checkins
Rebase for Clarity
Rebase for Clarity
git checkout myfeaturebranch
git rebase master

ā€£Cleaner history than a merge.
ā€£Fast forwards original branch.
ā€£Lets you see ā€œhow trunk will actā€ before you merge.
ā€£Reposition your feature branchā€™s start point.
ā€£Makes for simpler merge graphs.
M
                 da
             S er
                   r
              ta g
                    d
                n e


Master/Trunk/MainLatest
M
                 da
             S er
                   r
              ta g
                    d
                n e


Master/Trunk/MainLatest
                          a32
ard                                   Bra
    d
   n e
 ta g
                                     a32      n   ch
S er

           Master/Trunk/MainLatest
   M                                 2e2
ard                                   Bra
    d
   n e
 ta g
                                     a32      n   ch
S er

           Master/Trunk/MainLatest
                                                       d19
   M                                 2e2
ard                                   Bra
    d
   n e
 ta g
                                     a32      n   ch
S er

           Master/Trunk/MainLatest
                                                       d19
   M                                 2e2



                                     8b3
ard                                   Bra
    d
   n e
 ta g
                                     a32      n   ch
S er

           Master/Trunk/MainLatest
                                                       d19
   M                                 2e2


                                                       e69
                                     8b3
ard                                   Bra
    d
   n e
 ta g
                                     a32      n   ch
S er

           Master/Trunk/MainLatest
                                                       d19
   M                                 2e2


                                                       e69
                                     8b3

                                              erge
                                             M
                                     9f1
Rebasing


Master/Trunk/MainLatest
Rebasing


Master/Trunk/MainLatest
                          a32
Rebasing


Master/Trunk/MainLatest
                           a32

                   2e2
                          Bra
                         ch  n
Bra
    sing                             a32
                                              n   ch
  ba

           Master/Trunk/MainLatest
Re                                   2e2               d19
Bra
    sing                             a32
                                              n   ch
  ba

           Master/Trunk/MainLatest
Re                                   2e2               d19

                                     8b3
Bra
    sing                             a32
                                              n   ch
  ba

           Master/Trunk/MainLatest
Re                                   2e2               d19

                                     8b3
                                                       e69
Master/Trunk/MainLatest
                           a32

                    2e2

              8b3
             Bra
             ch n

       d19


e69




Rebase
a32




Master/Trunk/MainLatest
                          2e2

                          8b3   Bra
                                   n   ch

                          d19               d19



                                Me
                                 rg
                                   e
                          e69               e69
WorkingOffline
Offline Anything
 Checkin
Offline Anything
 Checkin
 Add
 Branch
 List change log
 Grep history
 Rewrite history
 Stash
 Merge
 Label
 Remove
Offline Anything
 Checkin
 Add
 Branch
 List change log
 Grep history
 Rewrite history
 Stash
 Merge
 Label
 Remove
 practically everything but push
Offline Anything
 Checkin
 Add
 Branch
 List change log
 Grep history
 Rewrite history
 Stash
 Merge
 Label
 Remove
 practically everything but push
Hooray! Another
checkin to my latest OSS
        project!
Hooray! Another
             checkin to my latest OSS
                     project!




   I think I liked
subversion better...
Speed
git: git
hg: mercurial
bzr: bazaar
Init               Add               Status               Diff
                                                                                      Branch (Cold/Hot)




git   hg     bzr   git   hg    bzr   git     hg     bzr   git   hg     bzr

      Tag                Log         Commit (Lg)          Commit (Sm)




                                                                             git c      git h    hg c     hg h     bzr c bzr h
git   hg     bzr   git   hg    bzr   git     hg     bzr   git   hg     bzr




                                                                                     data from http://whygitisbetterthanx.com/#git-is-fast
10
 to
     100 times
       Faster
VCS Interop
Subversion
git svn clone http://unfurl.com/trunk
git svn dcommit
Subversion
git svn clone http://unfurl.com/trunk
git svn dcommit


ā€£ First class compatibility.
Subversion
git svn clone http://unfurl.com/trunk
git svn dcommit


ā€£ First class compatibility.
ā€£ Round trip support.
Subversion
git svn clone http://unfurl.com/trunk
git svn dcommit


ā€£ First class compatibility.
ā€£ Round trip support.
ā€£ Git commits = svn commits.
Migration

ā€£ git svn clone
Migration

ā€£ git svn clone

ā€£ Power off your Subversion server.
What?        Why?

              Basic Use




                           Whoā€™s       Theory
DVCS                      Using Git?
                                 Deeper
                                  Use




         Usage Models

       GUIs     High Points
UsageModels
Centralized
Central
 Repo
Centralized
Central
 Repo
Repo
               Blessed




Dictatorship
Repo
               Blessed




Dictatorship
Repo
               Blessed




Dictatorship
Repo
               Blessed




Dictatorship
Repo
               Blessed




Dictatorship
Certiļ¬ed




                         Integration Managed
           Development
 Repo         Repo
Certiļ¬ed




                         Integration Managed
           Development
 Repo         Repo
Certiļ¬ed




                         Integration Managed
           Development
 Repo         Repo
Certiļ¬ed




                         Integration Managed
           Development
 Repo         Repo
Mirror           Mirror

Certiļ¬ed       Development
 Repo             Repo




                                Mirrored
Mirror           Mirror

Certiļ¬ed       Development
 Repo             Repo




                                Mirrored
Mirror           Mirror

Certiļ¬ed       Development
 Repo             Repo




                                Mirrored
Mirror           Mirror

Certiļ¬ed       Development
 Repo             Repo




                                Mirrored
Mirror           Mirror

Certiļ¬ed       Development
 Repo             Repo




                                Mirrored
ā˜š Private            Public ā˜›




                   GitHub




Custom + Public Contrib
ā˜š Private            Public ā˜›




                   GitHub




Custom + Public Contrib
ā˜š Private               Public ā˜›




         Customized
                      GitHub




Custom + Public Contrib
ā˜š Private               Public ā˜›




         Customized
                      GitHub




Custom + Public Contrib
ā˜š Private               Public ā˜›




         Customized
                      GitHub




Custom + Public Contrib
GUIs
GitX
GitSafe
GitK
GitGUI
EGit
ci a l !
        O f fi
It ā€™s
4
reasons
Cherry Pick



ā¹
Cherry Pick



ā¹
Cherry Pick

ā€£git



           ā¹
       cherry-pick a5b2ee
Cherry Pick

ā€£git



             ā¹
       cherry-pick a5b2ee

ā€£Merge in just one commit.
Cherry Pick

ā€£git



             ā¹
       cherry-pick a5b2ee

ā€£Merge in just one commit.
ā€£When you want a nugget, not a branchload.
Bisect Bugs



āø
Bisect Bugs



āø
Bisect Bugs

ā€£git



           āø
       bisect run mvn test
Bisect Bugs

ā€£git



              āø
       bisect run mvn test

ā€£Binary-search for bug.
Bisect Bugs

ā€£git



              āø
       bisect run mvn test

ā€£Binary-search for bug.
ā€£Manual or automated modes.
Squash Verbosity



  ā·
Squash Verbosity



  ā·
Squash Verbosity



           ā·
ā€£git   merge --squash mybranch
Squash Verbosity



             ā·
ā€£git   merge --squash mybranch

ā€£Reduce all your micro-checkins to block commits.
Squash Verbosity



              ā·
ā€£git   merge --squash mybranch

ā€£Reduce all your micro-checkins to block commits.
ā€£Make mistakes, revise, checkin without hesitation.
Squash Verbosity



              ā·
ā€£git   merge --squash mybranch

ā€£Reduce all your micro-checkins to block commits.
ā€£Make mistakes, revise, checkin without hesitation.
ā€£Great for SVN compatibility.
Search History



 ā¶
Search History



 ā¶
Search History

ā€£git



           ā¶
       grep SomeText HEAD^^^
Search History

ā€£git



             ā¶
       grep SomeText HEAD^^^

ā€£Search in ļ¬le history without checkout.
Search History

ā€£git



             ā¶
       grep SomeText HEAD^^^

ā€£Search in ļ¬le history without checkout.
ā€£Greps contents.
emerging Control
     Version
Twitter
 @matthewmccull             Matthew
Blog
 http://www.ambientideas.com/blog
         sidebar has all my social media links


Email
 matthewm@ambientideas.com
GitHub
 http://github.com/matthewmccullough
Resources
Git Homepage
http://git-scm.com

Directed Acrylic Graph
http://en.wikipedia.org/wiki/Directed_acyclic_graph

Git for Computer Scientists
http://eagain.net/articles/git-for-computer-scientists/

Git Treeish
http://book.git-scm.com/4_git_treeishes.html
Resources
Git Docs
http://www.kernel.org/pub/software/scm/git/docs/

Git Magic eBook
http://www-cs-students.stanford.edu/~blynn/gitmagic/book.pdf

Linus Torvaldā€™s Git talk at Google
http://www.youtube.com/watch?v=4XpnKHJAok8

CygWin
http://www.cygwin.com
Resources
MSysGit
http://code.google.com/p/msysgit

Git Cheetah
http://code.google.com/p/msysgit/wiki/GitCheetah

Matthewā€™s Git Bookmarks
http://delicious.com/matthew.mccullough/git

Matthewā€™s Bash Prompt
http://gist.github.com/47267
Image Credits
ā€£   http://www.ambientideasphotography.com
ā€£   http://ļ¬‚ickr.com/photos/lenore-m/2903856664/
ā€£   http://en.wikipedia.org/wiki/Git_(software)
ā€£   http://ļ¬‚ickr.com/photos/karenhorton/1583513014/
ā€£   http://ļ¬‚ickr.com/photos/mashdnart/2545782407/
ā€£   http://commons.wikimedia.org/wiki/
    File:Small_Boy_nuclear_test_1962.jpg
ā€£   http://www.ļ¬‚ickr.com/photos/knmurphy/2506896257/
ā€£   http://www.ļ¬‚ickr.com/photos/albyspace/1022035568/
ā€£   http://ļ¬‚ickr.com/photos/michaelhays/3070238360/
ā€£   http://ļ¬‚ickr.com/photos/d_vdm/509996632/

More Related Content

Similar to Git Going With DVCS v1.5.1

Git Going With DVCS v1.3
Git Going With DVCS v1.3Git Going With DVCS v1.3
Git Going With DVCS v1.3Matthew McCullough
Ā 
Becoming a Git Master - Nicola Paolucci
Becoming a Git Master - Nicola PaolucciBecoming a Git Master - Nicola Paolucci
Becoming a Git Master - Nicola PaolucciAtlassian
Ā 
Git introduction
Git introductionGit introduction
Git introductionKornel Lugosi
Ā 
Progressive Revision Control
Progressive Revision ControlProgressive Revision Control
Progressive Revision Controlcollabock
Ā 
That's (g)it! par SĆ©bastien Dawans CETIC
That's (g)it! par SĆ©bastien Dawans CETICThat's (g)it! par SĆ©bastien Dawans CETIC
That's (g)it! par SĆ©bastien Dawans CETICLa FeWeb
Ā 
Boxen: How to Manage an Army of Laptops
Boxen: How to Manage an Army of LaptopsBoxen: How to Manage an Army of Laptops
Boxen: How to Manage an Army of LaptopsPuppet
Ā 
Deep dark-side of git: How git works internally
Deep dark-side of git: How git works internallyDeep dark-side of git: How git works internally
Deep dark-side of git: How git works internallySeongJae Park
Ā 
Ninja Git: Save Your Master
Ninja Git: Save Your MasterNinja Git: Save Your Master
Ninja Git: Save Your MasterNicola Paolucci
Ā 
Clearly, I Have Made Some Bad Decisions
Clearly, I Have Made Some Bad DecisionsClearly, I Have Made Some Bad Decisions
Clearly, I Have Made Some Bad DecisionsJonathan Hitchcock
Ā 
Git Started With Git
Git Started With GitGit Started With Git
Git Started With GitNick Quaranto
Ā 
Git Magic: Versioning Files like a Boss
Git Magic: Versioning Files like a BossGit Magic: Versioning Files like a Boss
Git Magic: Versioning Files like a Bosstmacwilliam
Ā 
Git Basics at Rails Underground
Git Basics at Rails UndergroundGit Basics at Rails Underground
Git Basics at Rails UndergroundAriejan de Vroom
Ā 
Git Basics - RubyFest 2009
Git Basics - RubyFest 2009Git Basics - RubyFest 2009
Git Basics - RubyFest 2009Ariejan de Vroom
Ā 
Working with Git
Working with GitWorking with Git
Working with GitPete Nicholls
Ā 
Terrible Ideas in Git - Corey Quinn, FutureAdvisor - DevOpsDays Tel Aviv 2015
Terrible Ideas in Git - Corey Quinn, FutureAdvisor - DevOpsDays Tel Aviv 2015Terrible Ideas in Git - Corey Quinn, FutureAdvisor - DevOpsDays Tel Aviv 2015
Terrible Ideas in Git - Corey Quinn, FutureAdvisor - DevOpsDays Tel Aviv 2015DevOpsDays Tel Aviv
Ā 
Hands-on VeriFast with STM32 microcontroller
Hands-on VeriFast with STM32 microcontrollerHands-on VeriFast with STM32 microcontroller
Hands-on VeriFast with STM32 microcontrollerKiwamu Okabe
Ā 
Free The Enterprise With Ruby & Master Your Own Domain
Free The Enterprise With Ruby & Master Your Own DomainFree The Enterprise With Ruby & Master Your Own Domain
Free The Enterprise With Ruby & Master Your Own DomainKen Collins
Ā 
Github - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsGithub - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsLee Hanxue
Ā 

Similar to Git Going With DVCS v1.5.1 (20)

Git Going With DVCS v1.3
Git Going With DVCS v1.3Git Going With DVCS v1.3
Git Going With DVCS v1.3
Ā 
Becoming a Git Master - Nicola Paolucci
Becoming a Git Master - Nicola PaolucciBecoming a Git Master - Nicola Paolucci
Becoming a Git Master - Nicola Paolucci
Ā 
Git introduction
Git introductionGit introduction
Git introduction
Ā 
Git
GitGit
Git
Ā 
Progressive Revision Control
Progressive Revision ControlProgressive Revision Control
Progressive Revision Control
Ā 
That's (g)it! par SĆ©bastien Dawans CETIC
That's (g)it! par SĆ©bastien Dawans CETICThat's (g)it! par SĆ©bastien Dawans CETIC
That's (g)it! par SĆ©bastien Dawans CETIC
Ā 
Boxen: How to Manage an Army of Laptops
Boxen: How to Manage an Army of LaptopsBoxen: How to Manage an Army of Laptops
Boxen: How to Manage an Army of Laptops
Ā 
Deep dark-side of git: How git works internally
Deep dark-side of git: How git works internallyDeep dark-side of git: How git works internally
Deep dark-side of git: How git works internally
Ā 
Ninja Git: Save Your Master
Ninja Git: Save Your MasterNinja Git: Save Your Master
Ninja Git: Save Your Master
Ā 
Clearly, I Have Made Some Bad Decisions
Clearly, I Have Made Some Bad DecisionsClearly, I Have Made Some Bad Decisions
Clearly, I Have Made Some Bad Decisions
Ā 
Git Started With Git
Git Started With GitGit Started With Git
Git Started With Git
Ā 
Git Magic: Versioning Files like a Boss
Git Magic: Versioning Files like a BossGit Magic: Versioning Files like a Boss
Git Magic: Versioning Files like a Boss
Ā 
Git Basics at Rails Underground
Git Basics at Rails UndergroundGit Basics at Rails Underground
Git Basics at Rails Underground
Ā 
Git Basics - RubyFest 2009
Git Basics - RubyFest 2009Git Basics - RubyFest 2009
Git Basics - RubyFest 2009
Ā 
Working with Git
Working with GitWorking with Git
Working with Git
Ā 
Terrible Ideas in Git - Corey Quinn, FutureAdvisor - DevOpsDays Tel Aviv 2015
Terrible Ideas in Git - Corey Quinn, FutureAdvisor - DevOpsDays Tel Aviv 2015Terrible Ideas in Git - Corey Quinn, FutureAdvisor - DevOpsDays Tel Aviv 2015
Terrible Ideas in Git - Corey Quinn, FutureAdvisor - DevOpsDays Tel Aviv 2015
Ā 
Hands-on VeriFast with STM32 microcontroller
Hands-on VeriFast with STM32 microcontrollerHands-on VeriFast with STM32 microcontroller
Hands-on VeriFast with STM32 microcontroller
Ā 
Free The Enterprise With Ruby & Master Your Own Domain
Free The Enterprise With Ruby & Master Your Own DomainFree The Enterprise With Ruby & Master Your Own Domain
Free The Enterprise With Ruby & Master Your Own Domain
Ā 
Git
GitGit
Git
Ā 
Github - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsGithub - Git Training Slides: Foundations
Github - Git Training Slides: Foundations
Ā 

More from Matthew McCullough

Using Git and GitHub Effectively at Emerge Interactive
Using Git and GitHub Effectively at Emerge InteractiveUsing Git and GitHub Effectively at Emerge Interactive
Using Git and GitHub Effectively at Emerge InteractiveMatthew McCullough
Ā 
All About GitHub Pull Requests
All About GitHub Pull RequestsAll About GitHub Pull Requests
All About GitHub Pull RequestsMatthew McCullough
Ā 
Adam Smith Builds an App
Adam Smith Builds an AppAdam Smith Builds an App
Adam Smith Builds an AppMatthew McCullough
Ā 
Git's Filter Branch Command
Git's Filter Branch CommandGit's Filter Branch Command
Git's Filter Branch CommandMatthew McCullough
Ā 
Git Graphs, Hashes, and Compression, Oh My
Git Graphs, Hashes, and Compression, Oh MyGit Graphs, Hashes, and Compression, Oh My
Git Graphs, Hashes, and Compression, Oh MyMatthew McCullough
Ā 
Git and GitHub at the San Francisco JUG
 Git and GitHub at the San Francisco JUG Git and GitHub at the San Francisco JUG
Git and GitHub at the San Francisco JUGMatthew McCullough
Ā 
Git and GitHub for RallyOn
Git and GitHub for RallyOnGit and GitHub for RallyOn
Git and GitHub for RallyOnMatthew McCullough
Ā 
Migrating from Subversion to Git and GitHub
Migrating from Subversion to Git and GitHubMigrating from Subversion to Git and GitHub
Migrating from Subversion to Git and GitHubMatthew McCullough
Ā 
Build Lifecycle Craftsmanship for the Transylvania JUG
Build Lifecycle Craftsmanship for the Transylvania JUGBuild Lifecycle Craftsmanship for the Transylvania JUG
Build Lifecycle Craftsmanship for the Transylvania JUGMatthew McCullough
Ā 
Git Going for the Transylvania JUG
Git Going for the Transylvania JUGGit Going for the Transylvania JUG
Git Going for the Transylvania JUGMatthew McCullough
Ā 
Transylvania JUG Pre-Meeting Announcements
Transylvania JUG Pre-Meeting AnnouncementsTransylvania JUG Pre-Meeting Announcements
Transylvania JUG Pre-Meeting AnnouncementsMatthew McCullough
Ā 
Game Theory for Software Developers at the Boulder JUG
Game Theory for Software Developers at the Boulder JUGGame Theory for Software Developers at the Boulder JUG
Game Theory for Software Developers at the Boulder JUGMatthew McCullough
Ā 
Cascading Through Hadoop for the Boulder JUG
Cascading Through Hadoop for the Boulder JUGCascading Through Hadoop for the Boulder JUG
Cascading Through Hadoop for the Boulder JUGMatthew McCullough
Ā 
R Data Analysis Software
R Data Analysis SoftwareR Data Analysis Software
R Data Analysis SoftwareMatthew McCullough
Ā 

More from Matthew McCullough (20)

Using Git and GitHub Effectively at Emerge Interactive
Using Git and GitHub Effectively at Emerge InteractiveUsing Git and GitHub Effectively at Emerge Interactive
Using Git and GitHub Effectively at Emerge Interactive
Ā 
All About GitHub Pull Requests
All About GitHub Pull RequestsAll About GitHub Pull Requests
All About GitHub Pull Requests
Ā 
Adam Smith Builds an App
Adam Smith Builds an AppAdam Smith Builds an App
Adam Smith Builds an App
Ā 
Git's Filter Branch Command
Git's Filter Branch CommandGit's Filter Branch Command
Git's Filter Branch Command
Ā 
Git Graphs, Hashes, and Compression, Oh My
Git Graphs, Hashes, and Compression, Oh MyGit Graphs, Hashes, and Compression, Oh My
Git Graphs, Hashes, and Compression, Oh My
Ā 
Git and GitHub at the San Francisco JUG
 Git and GitHub at the San Francisco JUG Git and GitHub at the San Francisco JUG
Git and GitHub at the San Francisco JUG
Ā 
Finding Things in Git
Finding Things in GitFinding Things in Git
Finding Things in Git
Ā 
Git and GitHub for RallyOn
Git and GitHub for RallyOnGit and GitHub for RallyOn
Git and GitHub for RallyOn
Ā 
Migrating from Subversion to Git and GitHub
Migrating from Subversion to Git and GitHubMigrating from Subversion to Git and GitHub
Migrating from Subversion to Git and GitHub
Ā 
Git Notes and GitHub
Git Notes and GitHubGit Notes and GitHub
Git Notes and GitHub
Ā 
Intro to Git and GitHub
Intro to Git and GitHubIntro to Git and GitHub
Intro to Git and GitHub
Ā 
Build Lifecycle Craftsmanship for the Transylvania JUG
Build Lifecycle Craftsmanship for the Transylvania JUGBuild Lifecycle Craftsmanship for the Transylvania JUG
Build Lifecycle Craftsmanship for the Transylvania JUG
Ā 
Git Going for the Transylvania JUG
Git Going for the Transylvania JUGGit Going for the Transylvania JUG
Git Going for the Transylvania JUG
Ā 
Transylvania JUG Pre-Meeting Announcements
Transylvania JUG Pre-Meeting AnnouncementsTransylvania JUG Pre-Meeting Announcements
Transylvania JUG Pre-Meeting Announcements
Ā 
Game Theory for Software Developers at the Boulder JUG
Game Theory for Software Developers at the Boulder JUGGame Theory for Software Developers at the Boulder JUG
Game Theory for Software Developers at the Boulder JUG
Ā 
Cascading Through Hadoop for the Boulder JUG
Cascading Through Hadoop for the Boulder JUGCascading Through Hadoop for the Boulder JUG
Cascading Through Hadoop for the Boulder JUG
Ā 
JQuery Mobile
JQuery MobileJQuery Mobile
JQuery Mobile
Ā 
R Data Analysis Software
R Data Analysis SoftwareR Data Analysis Software
R Data Analysis Software
Ā 
Please, Stop Using Git
Please, Stop Using GitPlease, Stop Using Git
Please, Stop Using Git
Ā 
Dr. Strangedev
Dr. StrangedevDr. Strangedev
Dr. Strangedev
Ā 

Recently uploaded

DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
Ā 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
Ā 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
Ā 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxnelietumpap1
Ā 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
Ā 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
Ā 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
Ā 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A BeƱa
Ā 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
Ā 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
Ā 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
Ā 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
Ā 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
Ā 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
Ā 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
Ā 

Recently uploaded (20)

Model Call Girl in Tilak Nagar Delhi reach out to us at šŸ”9953056974šŸ”
Model Call Girl in Tilak Nagar Delhi reach out to us at šŸ”9953056974šŸ”Model Call Girl in Tilak Nagar Delhi reach out to us at šŸ”9953056974šŸ”
Model Call Girl in Tilak Nagar Delhi reach out to us at šŸ”9953056974šŸ”
Ā 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
Ā 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
Ā 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
Ā 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
Ā 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
Ā 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptx
Ā 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
Ā 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
Ā 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
Ā 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
Ā 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
Ā 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
Ā 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
Ā 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
Ā 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Ā 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
Ā 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
Ā 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
Ā 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
Ā 

Git Going With DVCS v1.5.1

  • 1. Git going with DVCS mental spoo n bending 90 minutes of v ia source c ode control by Matthew McCullough of Ambient Ideas, LLC
  • 3. What? Why? Basic Use DVCS
  • 4. What? Why? Basic Use Whoā€™s Theory DVCS Using Git? Deeper Use
  • 5. What? Why? Basic Use Whoā€™s Theory DVCS Using Git? Deeper Use Usage Models GUIs High Points
  • 6. ā€œ Git -noun sant or Slang. an unplea British cont emptible per son ā€ ionar y -Oxfo rd English Dict
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16. otistical bastard, and ā€œ I'm an eg I name all my projects after myself. Fi rst Linux, now git. ā€ -Lin us Torvalds
  • 17. otistical bastard, and ā€œ I'm an eg I name all my projects after myself. Fi rst Linux, now git. ā€ -Lin us Torvalds
  • 18.
  • 20. Clear Source Case Safe CVS PVCS RCS Folders
  • 21. Subversion BitKeeper Perforce Clear Source Case Safe CVS PVCS RCS Folders
  • 22. darcs Mercurial Bazaar Subversion BitKeeper Perforce Clear Source Case Safe CVS PVCS RCS Folders
  • 26.
  • 27.
  • 28.
  • 29.
  • 30. Centralized VCS =Donā€™t
  • 31. Centralized VCS =Donā€™t
  • 32. Distributed VCS = Whatever! Do
  • 40.
  • 41. Just show it to me!
  • 42.
  • 43. No, not on that!
  • 44.
  • 46. Git Distro Sources Win Cygwin Win msysGit
  • 47. Git Distro Sources Win Cygwin Win msysGit Linux Source Linux Package manager
  • 48. Git Distro Sources Win Cygwin Win msysGit Linux Source Linux Package manager Mac MacPorts Mac git-osx-installer
  • 49. Git Distro Sources Win Cygwin Win msysGit Linux Source Linux Package manager Mac MacPorts Mac git-osx-installer Any JGit
  • 50. Put it in your path
  • 51.
  • 53. Global Git Settings git conļ¬g --global user.name quot;Hal Smithquot; git conļ¬g --global user.email quot;hal@bnl.comquot;
  • 54. Global Git Settings git conļ¬g --list
  • 55. Global Git Settings git conļ¬g --list t va lues t cu rren Outpu
  • 57. Creating a Repo mkdir myproj.git
  • 58. Creating a Repo mkdir myproj.git cd myproj.git
  • 59. Creating a Repo mkdir myproj.git cd myproj.git git init
  • 60. Creating a Repo ! mkdir myproj.git D O N E cd myproj.git git init
  • 63.
  • 64.
  • 66. What? Why? Basic Use Whoā€™s Theory DVCS Using Git? Deeper Use Usage Models GUIs High Points
  • 68.
  • 69.
  • 70.
  • 71.
  • 72.
  • 73.
  • 74.
  • 75.
  • 76.
  • 77. Follow the DOTS
  • 79.
  • 80.
  • 81.
  • 82.
  • 83.
  • 84.
  • 85.
  • 86.
  • 87.
  • 88.
  • 89.
  • 92.
  • 93.
  • 94.
  • 95.
  • 96.
  • 97.
  • 98. pu sh
  • 99. pu sh
  • 100.
  • 101.
  • 102. push
  • 103. push
  • 104.
  • 105.
  • 106. pull
  • 107. pull
  • 108.
  • 110. Hashes and Integrity
  • 111. Index vs Hash ā€£ Centralized VCS uses DB sequential index. ā€£ Git uses SHA-1 hash.
  • 112. SHA-1 Hash ā€£ Hash for the sake of integrity. ā€£ Keep the source of the hash.
  • 113. SHA-1 Hash ā€£ Hash for the sake of integrity. ā€£ Keep the source of the hash. ught I tho ere es w hash r fo swo rds? pas
  • 115. Alice Bob
  • 116. Alice Bob 1 = okay.htm
  • 117. Alice Bob 1 = okay.htm 2 = ļ¬ne.htm
  • 118. Alice Bob 1 = okay.htm 2 = ļ¬ne.htm svnsync
  • 119. Alice Bob 1 = okay.htm 1 = okay.htm 2 = ļ¬ne.htm svnsync 2 = ļ¬ne.htm
  • 120. Alice Bob 1 = okay.htm 1 = okay.htm 2 = ļ¬ne.htm svnsync 2 = ļ¬ne.htm 3 = good.htm
  • 121. Alice Bob 1 = okay.htm 1 = okay.htm 2 = ļ¬ne.htm svnsync 2 = ļ¬ne.htm 3 = good.htm 3 = great.htm
  • 122. Alice Bob 1 = okay.htm 1 = okay.htm 2 = ļ¬ne.htm svnsync 2 = ļ¬ne.htm 3 = good.htm 3 = great.htm svnsync
  • 123. Alice Bob 1 = okay.htm 1 = okay.htm 2 = ļ¬ne.htm svnsync 2 = ļ¬ne.htm 4 = good.htm 3 = good.htm 3 = great.htm svnsync 4 = great.htm
  • 124. Alice Bob 1 = okay.htm 1 = okay.htm 2 = ļ¬ne.htm svnsync 2 = ļ¬ne.htm ERROR 4 = good.htm 3 = good.htm 3 = great.htm ERROR svnsync 4 = great.htm
  • 126. Alice Bob
  • 127. Alice Bob a233b76 = okay.htm
  • 128. Alice Bob a233b76 = okay.htm d234ab1 = ļ¬ne.htm
  • 129. Alice Bob a233b76 = okay.htm d234ab1 = ļ¬ne.htm Sync
  • 130. Alice Bob a233b76 = okay.htm a233b76 = okay.htm d234ab1 = ļ¬ne.htm Sync d234ab1 = ļ¬ne.htm
  • 131. Alice Bob a233b76 = okay.htm a233b76 = okay.htm d234ab1 = ļ¬ne.htm Sync d234ab1 = ļ¬ne.htm f90b12c = good.htm
  • 132. Alice Bob a233b76 = okay.htm a233b76 = okay.htm d234ab1 = ļ¬ne.htm Sync d234ab1 = ļ¬ne.htm f90b12c = good.htm ae42ba0 = great.htm
  • 133. Alice Bob a233b76 = okay.htm a233b76 = okay.htm d234ab1 = ļ¬ne.htm Sync d234ab1 = ļ¬ne.htm f90b12c = good.htm ae42ba0 = great.htm Sync
  • 134. Alice Bob a233b76 = okay.htm a233b76 = okay.htm d234ab1 = ļ¬ne.htm Sync d234ab1 = ļ¬ne.htm f90b12c = good.htm f90b12c = good.htm ae42ba0 = great.htm Sync ae42ba0 = great.htm
  • 135. Hashable Objects ā€£ Blob ā€£ Tree ā€£ Commit ā€£ Tag
  • 140. Hash Benefits Independence ā€£ Time & location separation from sequence # of checkin. ā€£ Easy merging of repositories ā€£ Easy identiļ¬cation of what needs to be synced
  • 141. Hash Benefits Integrity ā€£ Identiļ¬es damaged repos. ā€£ Prevents modiļ¬cation of published history. ā€£ Unique to ļ¬le size and contents.
  • 142. Hash Benefits Tags ā€£ Cryptographically sign tags by GPG. ā€£ Guaranteeing the repoā€™s state at a point in time.
  • 144. Single Stage Thinking of Subversion
  • 145. Subversion ā€£ svn commit ā€£ Adds everything modiļ¬ed. ā€£ ā€œcommittedā€ locally and on the server. ā€£ Must list if you want speciļ¬c ļ¬les. ā€£ What if you check in your password?
  • 146. $ echo //COMMENTS >> Matt1.java $ echo //THOUGHTS >> Matt2.java
  • 147. $ echo //COMMENTS >> Matt1.java $ echo //THOUGHTS >> Matt2.java $ svn status M Matt1.java M Matt2.java
  • 148. $ echo //COMMENTS >> Matt1.java $ echo //THOUGHTS >> Matt2.java $ svn status M Matt1.java M Matt2.java $ svn commit -m'Matts checkin' Adding Matt1.java Adding Matt2.java Transmitting file data . Committed revision 2.
  • 150. Git ā€£ git add ā€£ git commit ā€£ git push ā€£ Commits only what is added to the index. ā€£ Opportunity to change history locally. ā€£ Selectively share with other repos.
  • 152. repo git clone git://somedomain/myproj.git B uild cd myproj.git dex pda te in git checkout master U
  • 153. repo git clone git://somedomain/myproj.git B uild cd myproj.git dex pda te in git checkout master U echo ā€˜//Commentsā€™ >> ClassOne.java or king echo ā€˜//Thoughtsā€™ >> ClassTwo.java E dit w
  • 154. repo git clone git://somedomain/myproj.git B uild cd myproj.git dex pda te in git checkout master U echo ā€˜//Commentsā€™ >> ClassOne.java or king echo ā€˜//Thoughtsā€™ >> ClassTwo.java E dit w to i ndex git add ClassOne.java Add epo ave to r git commit -mā€™Added commentsā€™ S
  • 155. repo git clone git://somedomain/myproj.git B uild cd myproj.git dex pda te in git checkout master U echo ā€˜//Commentsā€™ >> ClassOne.java or king echo ā€˜//Thoughtsā€™ >> ClassTwo.java E dit w to i ndex git add ClassOne.java Add epo ave to r git commit -mā€™Added commentsā€™ S st ash git stash Pus h to
  • 156. Remote is like a special Stash Repo Index Working
  • 157. Remote is like a special Stash Repo Index Working
  • 158. Remote is like a special Stash Repo git clone Index Working
  • 159. Remote is like a special Stash Repo git clone git checkout Index Working
  • 160. Remote is like a special Stash Repo git clone git checkout edit experiment ļ¬les Index Working
  • 161. Remote is like a special Stash Repo git clone git checkout edit experiment ļ¬les git stash Index Working
  • 162. Remote is like a special Stash Repo git clone git checkout edit experiment ļ¬les git stash test buggy ļ¬les Index Working
  • 163. Remote is like a special Stash Repo git clone git checkout edit experiment ļ¬les git stash test buggy ļ¬les Index git stash apply Working
  • 164. Remote is like a special Stash Repo git clone git checkout edit experiment ļ¬les git stash test buggy ļ¬les Index git stash apply Working git add
  • 165. Remote is like a special Stash Repo git clone git checkout edit experiment ļ¬les git stash test buggy ļ¬les Index git stash apply Working git add git commit
  • 166. Remote is like a special Stash Repo git clone git checkout edit experiment ļ¬les git stash test buggy ļ¬les Index git stash apply Working git add git commit git push
  • 167. Remote is like a special Stash Repo git clone git checkout edit experiment ļ¬les git stash test buggy ļ¬les Index git stash apply Working git add git commit git push
  • 168. What does this buy me?
  • 169. $ echo //MYD0GSNAM3 >> mattfile1.txt $ echo //NewText2 >> mattfile2.txt
  • 170. $ echo //MYD0GSNAM3 >> mattfile1.txt $ echo //NewText2 >> mattfile2.txt $ git status # On branch master # Changed but not updated: # modified: mattfile1.txt # modified: mattfile2.txt
  • 171. $ echo //MYD0GSNAM3 >> mattfile1.txt $ echo //NewText2 >> mattfile2.txt $ git status # On branch master # Changed but not updated: # modified: mattfile1.txt # modified: mattfile2.txt o in dex int $ git add mattfile1.txt Put
  • 172. $ echo //MYD0GSNAM3 >> mattfile1.txt $ echo //NewText2 >> mattfile2.txt $ git status # On branch master # Changed but not updated: # modified: mattfile1.txt # modified: mattfile2.txt o in dex int $ git add mattfile1.txt Put to r epo S ave $ git commit -m'Matts pw checkin' [master]: created ddcdf18: quot;Matts pw checkinquot; 1 files changed, 1 insertions(+), 0 deletions(-)
  • 173. #$%^&! I just committed my password!
  • 174. Change History $ git reset --hard HEAD^ HEAD is now at 9de4cd3 First checkin $ git log commit 9de4cd3a3f24a3de3e804df84cc3321c7d0c9993 Author: Matthew McCullough <matthewm@ambientideas.com> Date: Wed Mar 4 23:09:17 2009 -0700 First checkin
  • 175. Change History com mit the w a way $ git reset --hard HEAD^ T hro HEAD is now at 9de4cd3 First checkin $ git log commit 9de4cd3a3f24a3de3e804df84cc3321c7d0c9993 Author: Matthew McCullough <matthewm@ambientideas.com> Date: Wed Mar 4 23:09:17 2009 -0700 First checkin
  • 176. Change History com mit the w a way $ git reset --hard HEAD^ T hro HEAD is now at 9de4cd3 First checkin $ git log commit 9de4cd3a3f24a3de3e804df84cc3321c7d0c9993 Author: Matthew McCullough <matthewm@ambientideas.com> Date: Wed Mar 4 23:09:17 2009 -0700 First checkin
  • 178. Serving It Up Protocols ā€£ GIT ā€£ SSH ā€£ SCP ā€£ Local ļ¬le system ā€£ SAMBA ā€£ HTTP ā€£ WebDAV ā€£ rsync
  • 179. Serving It Up Network ā€£ git instaweb. Built in, read-only, HTTP. ā€£ git daemon. Custom socket language. ā€£ gitosis. Easy permissions control. ā€£ github. Open source & private repos. ā€£ ssh. OS controlled permissions.
  • 180.
  • 181.
  • 182. Serving It Up Filesystem ā€£ Local folders. Yes, they can be ā€œremotes.ā€ ā€£ Mapped network drives. Just like folders.
  • 183. aem on git clone git://somehost.org/myproj.git g it d
  • 184. aem on git clone git://somehost.org/myproj.git g it d git clone mccm06@somehost.org:myproj.git SSH
  • 185. aem on git clone git://somehost.org/myproj.git g it d git clone mccm06@somehost.org:myproj.git SSH git clone http://somehost.org/myproj.git H TTP
  • 186. aem on git clone git://somehost.org/myproj.git g it d git clone mccm06@somehost.org:myproj.git SSH git clone http://somehost.org/myproj.git H TTP sys tem git clone ~/work/myproj.git File
  • 187. aem on git clone git://somehost.org/myproj.git g it d git clone mccm06@somehost.org:myproj.git SSH git clone http://somehost.org/myproj.git H TTP sys tem git clone ~/work/myproj.git File rk d rive Ne two git clone z:someservermyproj.git
  • 190. Cheap Branches git show-branch --all git branch -a ā€£Local branch ā€£localbranchname ā€£Remote ā€£remote/branchname
  • 192. Merge Anything git merge --no-commit <sourcebranch> git merge --squash <sourcebranch> git merge <sourcebranch1> <sourcebranch2> ā€£Selectable merge strategy ā€£Octopus: More than one ā€£Review before committing ā€£Flatten micro-checkins
  • 194. Rebase for Clarity git checkout myfeaturebranch git rebase master ā€£Cleaner history than a merge. ā€£Fast forwards original branch. ā€£Lets you see ā€œhow trunk will actā€ before you merge. ā€£Reposition your feature branchā€™s start point. ā€£Makes for simpler merge graphs.
  • 195. M da S er r ta g d n e Master/Trunk/MainLatest
  • 196. M da S er r ta g d n e Master/Trunk/MainLatest a32
  • 197. ard Bra d n e ta g a32 n ch S er Master/Trunk/MainLatest M 2e2
  • 198. ard Bra d n e ta g a32 n ch S er Master/Trunk/MainLatest d19 M 2e2
  • 199. ard Bra d n e ta g a32 n ch S er Master/Trunk/MainLatest d19 M 2e2 8b3
  • 200. ard Bra d n e ta g a32 n ch S er Master/Trunk/MainLatest d19 M 2e2 e69 8b3
  • 201. ard Bra d n e ta g a32 n ch S er Master/Trunk/MainLatest d19 M 2e2 e69 8b3 erge M 9f1
  • 204. Rebasing Master/Trunk/MainLatest a32 2e2 Bra ch n
  • 205. Bra sing a32 n ch ba Master/Trunk/MainLatest Re 2e2 d19
  • 206. Bra sing a32 n ch ba Master/Trunk/MainLatest Re 2e2 d19 8b3
  • 207. Bra sing a32 n ch ba Master/Trunk/MainLatest Re 2e2 d19 8b3 e69
  • 208. Master/Trunk/MainLatest a32 2e2 8b3 Bra ch n d19 e69 Rebase
  • 209. a32 Master/Trunk/MainLatest 2e2 8b3 Bra n ch d19 d19 Me rg e e69 e69
  • 212. Offline Anything Checkin Add Branch List change log Grep history Rewrite history Stash Merge Label Remove
  • 213. Offline Anything Checkin Add Branch List change log Grep history Rewrite history Stash Merge Label Remove practically everything but push
  • 214. Offline Anything Checkin Add Branch List change log Grep history Rewrite history Stash Merge Label Remove practically everything but push
  • 215.
  • 216. Hooray! Another checkin to my latest OSS project!
  • 217. Hooray! Another checkin to my latest OSS project! I think I liked subversion better...
  • 218. Speed
  • 220. Init Add Status Diff Branch (Cold/Hot) git hg bzr git hg bzr git hg bzr git hg bzr Tag Log Commit (Lg) Commit (Sm) git c git h hg c hg h bzr c bzr h git hg bzr git hg bzr git hg bzr git hg bzr data from http://whygitisbetterthanx.com/#git-is-fast
  • 221.
  • 222. 10 to 100 times Faster
  • 224. Subversion git svn clone http://unfurl.com/trunk git svn dcommit
  • 225. Subversion git svn clone http://unfurl.com/trunk git svn dcommit ā€£ First class compatibility.
  • 226. Subversion git svn clone http://unfurl.com/trunk git svn dcommit ā€£ First class compatibility. ā€£ Round trip support.
  • 227. Subversion git svn clone http://unfurl.com/trunk git svn dcommit ā€£ First class compatibility. ā€£ Round trip support. ā€£ Git commits = svn commits.
  • 228.
  • 230. Migration ā€£ git svn clone ā€£ Power off your Subversion server.
  • 231. What? Why? Basic Use Whoā€™s Theory DVCS Using Git? Deeper Use Usage Models GUIs High Points
  • 235. Repo Blessed Dictatorship
  • 236. Repo Blessed Dictatorship
  • 237. Repo Blessed Dictatorship
  • 238. Repo Blessed Dictatorship
  • 239. Repo Blessed Dictatorship
  • 240. Certiļ¬ed Integration Managed Development Repo Repo
  • 241. Certiļ¬ed Integration Managed Development Repo Repo
  • 242. Certiļ¬ed Integration Managed Development Repo Repo
  • 243. Certiļ¬ed Integration Managed Development Repo Repo
  • 244. Mirror Mirror Certiļ¬ed Development Repo Repo Mirrored
  • 245. Mirror Mirror Certiļ¬ed Development Repo Repo Mirrored
  • 246. Mirror Mirror Certiļ¬ed Development Repo Repo Mirrored
  • 247. Mirror Mirror Certiļ¬ed Development Repo Repo Mirrored
  • 248. Mirror Mirror Certiļ¬ed Development Repo Repo Mirrored
  • 249. ā˜š Private Public ā˜› GitHub Custom + Public Contrib
  • 250. ā˜š Private Public ā˜› GitHub Custom + Public Contrib
  • 251. ā˜š Private Public ā˜› Customized GitHub Custom + Public Contrib
  • 252. ā˜š Private Public ā˜› Customized GitHub Custom + Public Contrib
  • 253. ā˜š Private Public ā˜› Customized GitHub Custom + Public Contrib
  • 254. GUIs
  • 255. GitX
  • 257. GitK
  • 258. GitGUI
  • 259. EGit
  • 260.
  • 261. ci a l ! O f fi It ā€™s
  • 262.
  • 266. Cherry Pick ā€£git ā¹ cherry-pick a5b2ee
  • 267. Cherry Pick ā€£git ā¹ cherry-pick a5b2ee ā€£Merge in just one commit.
  • 268. Cherry Pick ā€£git ā¹ cherry-pick a5b2ee ā€£Merge in just one commit. ā€£When you want a nugget, not a branchload.
  • 271. Bisect Bugs ā€£git āø bisect run mvn test
  • 272. Bisect Bugs ā€£git āø bisect run mvn test ā€£Binary-search for bug.
  • 273. Bisect Bugs ā€£git āø bisect run mvn test ā€£Binary-search for bug. ā€£Manual or automated modes.
  • 274. Squash Verbosity ā·
  • 275. Squash Verbosity ā·
  • 276. Squash Verbosity ā· ā€£git merge --squash mybranch
  • 277. Squash Verbosity ā· ā€£git merge --squash mybranch ā€£Reduce all your micro-checkins to block commits.
  • 278. Squash Verbosity ā· ā€£git merge --squash mybranch ā€£Reduce all your micro-checkins to block commits. ā€£Make mistakes, revise, checkin without hesitation.
  • 279. Squash Verbosity ā· ā€£git merge --squash mybranch ā€£Reduce all your micro-checkins to block commits. ā€£Make mistakes, revise, checkin without hesitation. ā€£Great for SVN compatibility.
  • 282. Search History ā€£git ā¶ grep SomeText HEAD^^^
  • 283. Search History ā€£git ā¶ grep SomeText HEAD^^^ ā€£Search in ļ¬le history without checkout.
  • 284. Search History ā€£git ā¶ grep SomeText HEAD^^^ ā€£Search in ļ¬le history without checkout. ā€£Greps contents.
  • 285.
  • 286.
  • 287. emerging Control Version
  • 288. Twitter @matthewmccull Matthew Blog http://www.ambientideas.com/blog sidebar has all my social media links Email matthewm@ambientideas.com GitHub http://github.com/matthewmccullough
  • 289. Resources Git Homepage http://git-scm.com Directed Acrylic Graph http://en.wikipedia.org/wiki/Directed_acyclic_graph Git for Computer Scientists http://eagain.net/articles/git-for-computer-scientists/ Git Treeish http://book.git-scm.com/4_git_treeishes.html
  • 290. Resources Git Docs http://www.kernel.org/pub/software/scm/git/docs/ Git Magic eBook http://www-cs-students.stanford.edu/~blynn/gitmagic/book.pdf Linus Torvaldā€™s Git talk at Google http://www.youtube.com/watch?v=4XpnKHJAok8 CygWin http://www.cygwin.com
  • 291. Resources MSysGit http://code.google.com/p/msysgit Git Cheetah http://code.google.com/p/msysgit/wiki/GitCheetah Matthewā€™s Git Bookmarks http://delicious.com/matthew.mccullough/git Matthewā€™s Bash Prompt http://gist.github.com/47267
  • 292. Image Credits ā€£ http://www.ambientideasphotography.com ā€£ http://ļ¬‚ickr.com/photos/lenore-m/2903856664/ ā€£ http://en.wikipedia.org/wiki/Git_(software) ā€£ http://ļ¬‚ickr.com/photos/karenhorton/1583513014/ ā€£ http://ļ¬‚ickr.com/photos/mashdnart/2545782407/ ā€£ http://commons.wikimedia.org/wiki/ File:Small_Boy_nuclear_test_1962.jpg ā€£ http://www.ļ¬‚ickr.com/photos/knmurphy/2506896257/ ā€£ http://www.ļ¬‚ickr.com/photos/albyspace/1022035568/ ā€£ http://ļ¬‚ickr.com/photos/michaelhays/3070238360/ ā€£ http://ļ¬‚ickr.com/photos/d_vdm/509996632/