SlideShare a Scribd company logo
Git for Subversion users




 PHPDay,Verona, 14-05-2011
zaterdag 14 mei 2011
Stefan who?




zaterdag 14 mei 2011
Stefan who?

                       • Freelancer: Ingewikkeld




zaterdag 14 mei 2011
Stefan who?

                       • Freelancer: Ingewikkeld
                       • Symfony Community Manager



zaterdag 14 mei 2011
Stefan who?

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


zaterdag 14 mei 2011
Version Control




zaterdag 14 mei 2011
Version Control

                       • Who is using version control?




zaterdag 14 mei 2011
Version Control

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



zaterdag 14 mei 2011
Version Control

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


zaterdag 14 mei 2011
Version Control

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

zaterdag 14 mei 2011
Subversion
                                 Server
                                 Repository




                Checkout   Checkout     Checkout   Checkout




zaterdag 14 mei 2011
Git

                       repository    repository      repository



                Checkout            Checkout       Checkout


                Checkout            Checkout       Checkout
                       repository     repository     repository




zaterdag 14 mei 2011
Git

                       repository    repository      repository



                Checkout            Checkout       Checkout


                Checkout            Checkout       Checkout
                       repository     repository     repository




zaterdag 14 mei 2011
Git

                       repository    repository      repository



                Checkout            Checkout       Checkout


                Checkout            Checkout       Checkout
                       repository     repository     repository




zaterdag 14 mei 2011
svnadmin create




zaterdag 14 mei 2011
svnadmin create
                           git init


zaterdag 14 mei 2011
svn add




zaterdag 14 mei 2011
svn add
                       git add


zaterdag 14 mei 2011
svn commit




zaterdag 14 mei 2011
svn commit
                       git commit


zaterdag 14 mei 2011
svn revert




zaterdag 14 mei 2011
svn revert
                       git checkout --


zaterdag 14 mei 2011
svn ... uhm...




zaterdag 14 mei 2011
svn ... uhm...
                       git reset HEAD <file>


zaterdag 14 mei 2011
svn status




zaterdag 14 mei 2011
svn status
                       git status


zaterdag 14 mei 2011
Share




zaterdag 14 mei 2011
Share

                       • local commit




zaterdag 14 mei 2011
Share

                       • local commit
                       • Git clone



zaterdag 14 mei 2011
Share

                       • local commit
                       • Git clone
                       • Zip and share


zaterdag 14 mei 2011
Share

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

zaterdag 14 mei 2011
git remote



zaterdag 14 mei 2011
git pull



zaterdag 14 mei 2011
git fetch



zaterdag 14 mei 2011
git push



zaterdag 14 mei 2011
zaterdag 14 mei 2011
Branch




zaterdag 14 mei 2011
Branch

                       • Subversion




zaterdag 14 mei 2011
Branch

                       • Subversion
                        • branch on the server



zaterdag 14 mei 2011
Branch

                       • Subversion
                        • branch on the server
                        • branching is expensive


zaterdag 14 mei 2011
Branchen




zaterdag 14 mei 2011
Branchen

                       • Git




zaterdag 14 mei 2011
Branchen

                       • Git
                        • very cheap



zaterdag 14 mei 2011
Branchen

                       • Git
                        • very cheap
                        • 1 command, local branch


zaterdag 14 mei 2011
Branchen

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

zaterdag 14 mei 2011
Tagging




zaterdag 14 mei 2011
Tagging

                       • Subversion




zaterdag 14 mei 2011
Tagging

                       • Subversion
                        • Copy on server



zaterdag 14 mei 2011
Tagging

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


zaterdag 14 mei 2011
Tagging




zaterdag 14 mei 2011
Tagging

                       • Git




zaterdag 14 mei 2011
Tagging

                       • Git
                        • lightweight



zaterdag 14 mei 2011
Tagging

                       • Git
                        • lightweight
                        • annotated


zaterdag 14 mei 2011
Tagging

                       • Git
                        • lightweight
                        • annotated
                          • is most like Subversion

zaterdag 14 mei 2011
Annotated


                       • git tag -a tagname -m bladiebla



zaterdag 14 mei 2011
Lightweight


                       • git tag tagname



zaterdag 14 mei 2011
svn propedit svn:externals




zaterdag 14 mei 2011
svn propedit svn:externals

                        git submodule add <repo> <name>




zaterdag 14 mei 2011
git submodule update



zaterdag 14 mei 2011
git submodule init



zaterdag 14 mei 2011
git rebase



zaterdag 14 mei 2011
merge
                   1




zaterdag 14 mei 2011
merge
                       origin


                   1    2a


                        2b
                       branch




zaterdag 14 mei 2011
merge
                       origin


                   1    2a      3a


                        2b      3b
                       branch




zaterdag 14 mei 2011
merge
                       origin


                   1    2a      3a   4a


                        2b      3b   4b
                       branch




zaterdag 14 mei 2011
merge
                       origin


                   1    2a      3a   4a


                        2b      3b   4b   merge
                       branch




zaterdag 14 mei 2011
rebase
                   1




zaterdag 14 mei 2011
rebase
                       origin


                   1    2a


                        2b
                       branch




zaterdag 14 mei 2011
rebase
                       origin


                   1    2a      3a


                        2b      3b
                       branch




zaterdag 14 mei 2011
rebase
                       origin


                   1    2a      3a   4a


                        2b      3b   4b
                       branch




zaterdag 14 mei 2011
rebase
                       origin


                   1    2a      3a   4a


                        2b      3b   4b
                       branch




zaterdag 14 mei 2011
rebase
                       origin


                   1    2a      3a   4a


                        2b      3b   4b
                       branch




zaterdag 14 mei 2011
rebase
                       origin


                   1    2a      3a   4a




                        2b      3b   4b
                       branch




zaterdag 14 mei 2011
rebase
                                          origin


       1               2a            3a            4a




                             2b             3b          4b
                            branch




zaterdag 14 mei 2011
rebase
                                 origin


       1               2a   3a            4a   2b   3b    4b
                                                         branch




zaterdag 14 mei 2011
rebase
                                 origin


       1               2a   3a            4a   2b   3b    4b
                                                         branch




zaterdag 14 mei 2011
interactive rebase



zaterdag 14 mei 2011
git stash



zaterdag 14 mei 2011
workflow



zaterdag 14 mei 2011
Tips & Tricks




zaterdag 14 mei 2011
Tips & Tricks


                       • git blame



zaterdag 14 mei 2011
Tips & Tricks


                       • git blame
                       • git-svn


zaterdag 14 mei 2011
questions?



zaterdag 14 mei 2011
thank you




zaterdag 14 mei 2011
thank you

                       • http://www.leftontheweb.com/
                       • https://github.com/skoop
                       • http://joind.in/3015


zaterdag 14 mei 2011

More Related Content

PDF
Git For Subversion Users (PHPNW11)
PPT
Controle de Versão GIT
PDF
Getting started with git svn
PDF
Effective Git
PDF
Burn down the silos! Helping dev and ops gel on high availability websites
PDF
Using Subversion and Git Together
PDF
A Practical Look At Symfony2
PDF
Git for Subversion Users (ZendCon 2011)
Git For Subversion Users (PHPNW11)
Controle de Versão GIT
Getting started with git svn
Effective Git
Burn down the silos! Helping dev and ops gel on high availability websites
Using Subversion and Git Together
A Practical Look At Symfony2
Git for Subversion Users (ZendCon 2011)

More from Stefan Koopmanschap (20)

PDF
A Practical Look at Symfony2 (PHPNW11)
PDF
Conference Speaking 101
PDF
Open Up (International PHP Conference Spring Edition 2011)
PDF
Would you like docs with that? - Zend Webinar
PDF
Git workshop (2value, 14-12-2010)
PDF
Git Workshop (Pfz Workshopdag)
PDF
Would you like docs with that? (IPC 2010)
PDF
Would you like docs with that? (IPC 2010)
PDF
Integrating symfony and Zend Framework (IPC 2010)
PDF
symfony 1.4 workshop
PDF
Would you like docs with that? (Pfcongres 2010)
PDF
The Symfony Community - How to (get) help
PPT
Integrating symfony and Zend Framework (PHPBarcelona 2009)
PPT
Integrating symfony and Zend Framework (PHPNW09)
PPT
Integrating symfony and Zend Framework
PDF
Scrum (dutch)
PDF
5 essential tools for the PHP Developer on Windows
PDF
The Power Of Refactoring (php|tek 09)
PDF
Myphp-busters: symfony framework (php|tek 09)
PDF
The Power Of Refactoring (PHPCon Italia)
A Practical Look at Symfony2 (PHPNW11)
Conference Speaking 101
Open Up (International PHP Conference Spring Edition 2011)
Would you like docs with that? - Zend Webinar
Git workshop (2value, 14-12-2010)
Git Workshop (Pfz Workshopdag)
Would you like docs with that? (IPC 2010)
Would you like docs with that? (IPC 2010)
Integrating symfony and Zend Framework (IPC 2010)
symfony 1.4 workshop
Would you like docs with that? (Pfcongres 2010)
The Symfony Community - How to (get) help
Integrating symfony and Zend Framework (PHPBarcelona 2009)
Integrating symfony and Zend Framework (PHPNW09)
Integrating symfony and Zend Framework
Scrum (dutch)
5 essential tools for the PHP Developer on Windows
The Power Of Refactoring (php|tek 09)
Myphp-busters: symfony framework (php|tek 09)
The Power Of Refactoring (PHPCon Italia)
Ad

Git for Subversion Users (phpDay 2011)