SlideShare una empresa de Scribd logo
1 de 85
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

Más contenido relacionado

Más de Stefan Koopmanschap

A Practical Look at Symfony2 (PHPNW11)
A Practical Look at Symfony2 (PHPNW11)A Practical Look at Symfony2 (PHPNW11)
A Practical Look at Symfony2 (PHPNW11)Stefan Koopmanschap
 
Open Up (International PHP Conference Spring Edition 2011)
Open Up (International PHP Conference Spring Edition 2011)Open Up (International PHP Conference Spring Edition 2011)
Open Up (International PHP Conference Spring Edition 2011)Stefan Koopmanschap
 
Would you like docs with that? - Zend Webinar
Would you like docs with that? - Zend WebinarWould you like docs with that? - Zend Webinar
Would you like docs with that? - Zend WebinarStefan Koopmanschap
 
Git workshop (2value, 14-12-2010)
Git workshop (2value, 14-12-2010)Git workshop (2value, 14-12-2010)
Git workshop (2value, 14-12-2010)Stefan Koopmanschap
 
Would you like docs with that? (IPC 2010)
Would you like docs with that? (IPC 2010)Would you like docs with that? (IPC 2010)
Would you like docs with that? (IPC 2010)Stefan Koopmanschap
 
Would you like docs with that? (IPC 2010)
Would you like docs with that? (IPC 2010)Would you like docs with that? (IPC 2010)
Would you like docs with that? (IPC 2010)Stefan Koopmanschap
 
Integrating symfony and Zend Framework (IPC 2010)
Integrating symfony and Zend Framework (IPC 2010)Integrating symfony and Zend Framework (IPC 2010)
Integrating symfony and Zend Framework (IPC 2010)Stefan Koopmanschap
 
Would you like docs with that? (Pfcongres 2010)
Would you like docs with that? (Pfcongres 2010)Would you like docs with that? (Pfcongres 2010)
Would you like docs with that? (Pfcongres 2010)Stefan Koopmanschap
 
The Symfony Community - How to (get) help
The Symfony Community - How to (get) helpThe Symfony Community - How to (get) help
The Symfony Community - How to (get) helpStefan Koopmanschap
 
Integrating symfony and Zend Framework (PHPBarcelona 2009)
Integrating symfony and Zend Framework (PHPBarcelona 2009)Integrating symfony and Zend Framework (PHPBarcelona 2009)
Integrating symfony and Zend Framework (PHPBarcelona 2009)Stefan Koopmanschap
 
Integrating symfony and Zend Framework (PHPNW09)
Integrating symfony and Zend Framework (PHPNW09)Integrating symfony and Zend Framework (PHPNW09)
Integrating symfony and Zend Framework (PHPNW09)Stefan Koopmanschap
 
Integrating symfony and Zend Framework
Integrating symfony and Zend FrameworkIntegrating symfony and Zend Framework
Integrating symfony and Zend FrameworkStefan Koopmanschap
 
5 essential tools for the PHP Developer on Windows
5 essential tools for the PHP Developer on Windows5 essential tools for the PHP Developer on Windows
5 essential tools for the PHP Developer on WindowsStefan Koopmanschap
 
The Power Of Refactoring (php|tek 09)
The Power Of Refactoring (php|tek 09)The Power Of Refactoring (php|tek 09)
The Power Of Refactoring (php|tek 09)Stefan Koopmanschap
 
Myphp-busters: symfony framework (php|tek 09)
Myphp-busters: symfony framework (php|tek 09)Myphp-busters: symfony framework (php|tek 09)
Myphp-busters: symfony framework (php|tek 09)Stefan Koopmanschap
 
The Power Of Refactoring (PHPCon Italia)
The Power Of Refactoring (PHPCon Italia)The Power Of Refactoring (PHPCon Italia)
The Power Of Refactoring (PHPCon Italia)Stefan Koopmanschap
 

Más de Stefan Koopmanschap (20)

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

Git for Subversion Users (phpDay 2011)