Git for Subversion users




 PHPNW11, 09-10-2011
zondag 9 oktober 11
Stefan who?




zondag 9 oktober 11
Stefan who?

                      • Freelancer: Ingewikkeld




zondag 9 oktober 11
Stefan who?

                      • Freelancer: Ingewikkeld
                      • Symfony Community Manager



zondag 9 oktober 11
Stefan who?

                      • Freelancer: Ingewikkeld
                      • Symfony Community Manager
                      • PFZ.nl event crew


zondag 9 oktober 11
Version Control




zondag 9 oktober 11
Version Control

                      • Who is using version control?




zondag 9 oktober 11
Version Control

                      • Who is using version control?
                      • Who is using CVS?



zondag 9 oktober 11
Version Control

                      • Who is using version control?
                      • Who is using CVS?
                      • Who is using Subversion?


zondag 9 oktober 11
Version Control

                      • Who is using version control?
                      • Who is using CVS?
                      • Who is using Subversion?
                      • Who is using something else? and what?

zondag 9 oktober 11
Subversion
                                  Server
                                  Repository




                 Checkout   Checkout     Checkout   Checkout




zondag 9 oktober 11
Git

                      repository    repository      repository



                 Checkout          Checkout       Checkout


                 Checkout          Checkout       Checkout
                      repository     repository     repository




zondag 9 oktober 11
Git

                      repository    repository      repository



                 Checkout          Checkout       Checkout


                 Checkout          Checkout       Checkout
                      repository     repository     repository




zondag 9 oktober 11
Git

                      repository    repository      repository



                 Checkout          Checkout       Checkout


                 Checkout          Checkout       Checkout
                      repository     repository     repository




zondag 9 oktober 11
svnadmin create




zondag 9 oktober 11
svnadmin create
                          git init


zondag 9 oktober 11
svn add




zondag 9 oktober 11
svn add
                      git add


zondag 9 oktober 11
svn commit




zondag 9 oktober 11
svn commit
                      git commit


zondag 9 oktober 11
svn revert




zondag 9 oktober 11
svn revert
                      git checkout --


zondag 9 oktober 11
svn ... uhm...




zondag 9 oktober 11
svn ... uhm...
                      git reset HEAD <file>


zondag 9 oktober 11
svn status




zondag 9 oktober 11
svn status
                      git status


zondag 9 oktober 11
Share




zondag 9 oktober 11
Share

                      • local commit




zondag 9 oktober 11
Share

                      • local commit
                      • Git clone



zondag 9 oktober 11
Share

                      • local commit
                      • Git clone
                      • Zip and share


zondag 9 oktober 11
Share

                      • local commit
                      • Git clone
                      • Zip and share
                       • not practical

zondag 9 oktober 11
git remote



zondag 9 oktober 11
git pull



zondag 9 oktober 11
git fetch



zondag 9 oktober 11
git push



zondag 9 oktober 11
zondag 9 oktober 11
Branch




zondag 9 oktober 11
Branch

                      • Subversion




zondag 9 oktober 11
Branch

                      • Subversion
                       • branch on the server



zondag 9 oktober 11
Branch

                      • Subversion
                       • branch on the server
                       • branching is expensive


zondag 9 oktober 11
Branchen




zondag 9 oktober 11
Branchen

                      • Git




zondag 9 oktober 11
Branchen

                      • Git
                       • very cheap



zondag 9 oktober 11
Branchen

                      • Git
                       • very cheap
                       • 1 command, local branch


zondag 9 oktober 11
Branchen

                      • Git
                       • very cheap
                       • 1 command, local branch
                       • switching is easy

zondag 9 oktober 11
Tagging




zondag 9 oktober 11
Tagging

                      • Subversion




zondag 9 oktober 11
Tagging

                      • Subversion
                       • Copy on server



zondag 9 oktober 11
Tagging

                      • Subversion
                       • Copy on server
                       • You can commit to a tag


zondag 9 oktober 11
Tagging




zondag 9 oktober 11
Tagging

                      • Git




zondag 9 oktober 11
Tagging

                      • Git
                       • lightweight



zondag 9 oktober 11
Tagging

                      • Git
                       • lightweight
                       • annotated


zondag 9 oktober 11
Tagging

                      • Git
                       • lightweight
                       • annotated
                         • is most like Subversion

zondag 9 oktober 11
Annotated


                      • git tag -a tagname -m bladiebla



zondag 9 oktober 11
Lightweight


                      • git tag tagname



zondag 9 oktober 11
svn propedit svn:externals




zondag 9 oktober 11
svn propedit svn:externals

                       git submodule add <repo> <name>




zondag 9 oktober 11
git submodule update



zondag 9 oktober 11
git submodule init



zondag 9 oktober 11
Tips & Tricks




zondag 9 oktober 11
Tips & Tricks

                      • git blame




zondag 9 oktober 11
Tips & Tricks

                      • git blame
                      • git-svn



zondag 9 oktober 11
Tips & Tricks

                      • git blame
                      • git-svn
                      • git stash


zondag 9 oktober 11
Tips & Tricks

                      • git blame
                      • git-svn
                      • git stash
                      • git rebase

zondag 9 oktober 11
questions?



zondag 9 oktober 11
thank you




zondag 9 oktober 11
thank you

                      • http://www.leftontheweb.com/
                      • https://github.com/skoop
                      • http://joind.in/talk/view/3605


zondag 9 oktober 11

Git For Subversion Users (PHPNW11)