Git for Subversion Users (ZendCon 2011)

Stefan Koopmanschap
Stefan KoopmanschapDeveloper, Consultant, Trainer at Ingewikkeld
Git for Subversion users




 ZendCon, 18-10-2011
dinsdag 18 oktober 11
Stefan who?




dinsdag 18 oktober 11
Stefan who?

                        • Freelancer: Ingewikkeld




dinsdag 18 oktober 11
Stefan who?

                        • Freelancer: Ingewikkeld
                        • Symfony Community Manager



dinsdag 18 oktober 11
Stefan who?

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


dinsdag 18 oktober 11
Version Control




dinsdag 18 oktober 11
Version Control

                        • Who is using version control?




dinsdag 18 oktober 11
Version Control

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



dinsdag 18 oktober 11
Version Control

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


dinsdag 18 oktober 11
Version Control

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

dinsdag 18 oktober 11
Subversion
                                  Server
                                  Repository




                 Checkout   Checkout     Checkout   Checkout




dinsdag 18 oktober 11
Git

                        repository    repository      repository



                 Checkout            Checkout       Checkout


                 Checkout            Checkout       Checkout
                        repository     repository     repository




dinsdag 18 oktober 11
Git

                        repository    repository      repository



                 Checkout            Checkout       Checkout


                 Checkout            Checkout       Checkout
                        repository     repository     repository




dinsdag 18 oktober 11
Git

                        repository    repository      repository



                 Checkout            Checkout       Checkout


                 Checkout            Checkout       Checkout
                        repository     repository     repository




dinsdag 18 oktober 11
svnadmin create




dinsdag 18 oktober 11
svnadmin create
                            git init


dinsdag 18 oktober 11
svn add




dinsdag 18 oktober 11
svn add
                        git add


dinsdag 18 oktober 11
svn commit




dinsdag 18 oktober 11
svn commit
                        git commit


dinsdag 18 oktober 11
svn revert




dinsdag 18 oktober 11
svn revert
                        git checkout --


dinsdag 18 oktober 11
svn ... uhm...




dinsdag 18 oktober 11
svn ... uhm...
                        git reset HEAD <file>


dinsdag 18 oktober 11
svn status




dinsdag 18 oktober 11
svn status
                        git status


dinsdag 18 oktober 11
Share




dinsdag 18 oktober 11
Share

                        • local commit




dinsdag 18 oktober 11
Share

                        • local commit
                        • Git clone



dinsdag 18 oktober 11
Share

                        • local commit
                        • Git clone
                        • Zip and share


dinsdag 18 oktober 11
Share

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

dinsdag 18 oktober 11
git remote



dinsdag 18 oktober 11
git pull



dinsdag 18 oktober 11
git fetch



dinsdag 18 oktober 11
git push



dinsdag 18 oktober 11
dinsdag 18 oktober 11
Branch




dinsdag 18 oktober 11
Branch

                        • Subversion




dinsdag 18 oktober 11
Branch

                        • Subversion
                         • branch on the server



dinsdag 18 oktober 11
Branch

                        • Subversion
                         • branch on the server
                         • branching is expensive


dinsdag 18 oktober 11
Branchen




dinsdag 18 oktober 11
Branchen

                        • Git




dinsdag 18 oktober 11
Branchen

                        • Git
                         • very cheap



dinsdag 18 oktober 11
Branchen

                        • Git
                         • very cheap
                         • 1 command, local branch


dinsdag 18 oktober 11
Branchen

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

dinsdag 18 oktober 11
Tagging




dinsdag 18 oktober 11
Tagging

                        • Subversion




dinsdag 18 oktober 11
Tagging

                        • Subversion
                         • Copy on server



dinsdag 18 oktober 11
Tagging

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


dinsdag 18 oktober 11
Tagging




dinsdag 18 oktober 11
Tagging

                        • Git




dinsdag 18 oktober 11
Tagging

                        • Git
                         • lightweight



dinsdag 18 oktober 11
Tagging

                        • Git
                         • lightweight
                         • annotated


dinsdag 18 oktober 11
Tagging

                        • Git
                         • lightweight
                         • annotated
                           • is most like Subversion

dinsdag 18 oktober 11
Annotated


                        • git tag -a tagname -m bladiebla



dinsdag 18 oktober 11
Lightweight


                        • git tag tagname



dinsdag 18 oktober 11
svn propedit svn:externals




dinsdag 18 oktober 11
svn propedit svn:externals

                         git submodule add <repo> <name>




dinsdag 18 oktober 11
git submodule update



dinsdag 18 oktober 11
git submodule init



dinsdag 18 oktober 11
git blame



dinsdag 18 oktober 11
git-svn



dinsdag 18 oktober 11
git stash



dinsdag 18 oktober 11
git rebase



dinsdag 18 oktober 11
git rebase




dinsdag 18 oktober 11
git rebase

                        • just like merging




dinsdag 18 oktober 11
git rebase

                        • just like merging
                        • more powerful



dinsdag 18 oktober 11
git rebase

                        • just like merging
                        • more powerful
                        • more dangerous


dinsdag 18 oktober 11
merge
                   1




dinsdag 18 oktober 11
merge
                        origin


                   1     2a


                         2b
                        branch




dinsdag 18 oktober 11
merge
                        origin


                   1     2a      3a


                         2b      3b
                        branch




dinsdag 18 oktober 11
merge
                        origin


                   1     2a      3a   4a


                         2b      3b   4b
                        branch




dinsdag 18 oktober 11
merge
                        origin


                   1     2a      3a   4a


                         2b      3b   4b   merge
                        branch




dinsdag 18 oktober 11
rebase
                   1




dinsdag 18 oktober 11
rebase
                        origin


                   1     2a


                         2b
                        branch




dinsdag 18 oktober 11
rebase
                        origin


                   1     2a      3a


                         2b      3b
                        branch




dinsdag 18 oktober 11
rebase
                        origin


                   1     2a      3a   4a


                         2b      3b   4b
                        branch




dinsdag 18 oktober 11
rebase
                        origin


                   1     2a      3a   4a


                         2b      3b   4b
                        branch




dinsdag 18 oktober 11
rebase
                        origin


                   1     2a      3a   4a


                         2b      3b   4b
                        branch




dinsdag 18 oktober 11
rebase
                        origin


                   1     2a      3a   4a




                         2b      3b   4b
                        branch




dinsdag 18 oktober 11
rebase
                                           origin


       1                2a            3a            4a




                              2b             3b          4b
                             branch




dinsdag 18 oktober 11
rebase
                                  origin


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




dinsdag 18 oktober 11
rebase
                                  origin


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




dinsdag 18 oktober 11
git rebase




dinsdag 18 oktober 11
git rebase


                        • conflicts



dinsdag 18 oktober 11
git rebase


                        • conflicts
                         • git rebase --continue


dinsdag 18 oktober 11
git rebase




dinsdag 18 oktober 11
git rebase

                        • interactive




dinsdag 18 oktober 11
git rebase

                        • interactive
                         • step by step rebase



dinsdag 18 oktober 11
git rebase

                        • interactive
                         • step by step rebase
                         • control over what happens


dinsdag 18 oktober 11
git rebase

                        • interactive
                         • step by step rebase
                         • control over what happens
                         • rewrite your history

dinsdag 18 oktober 11
workflows



dinsdag 18 oktober 11
the “github way”




dinsdag 18 oktober 11
the “github way”
                        • fork




dinsdag 18 oktober 11
the “github way”
                        • fork
                        • clone




dinsdag 18 oktober 11
the “github way”
                        • fork
                        • clone
                        • develop in branch



dinsdag 18 oktober 11
the “github way”
                        • fork
                        • clone
                        • develop in branch
                        • push branch


dinsdag 18 oktober 11
the “github way”
                        • fork
                        • clone
                        • develop in branch
                        • push branch
                        • pull request

dinsdag 18 oktober 11
the “github way”
                        • fork
                        • clone
                        • develop in branch
                        • push branch
                        • pull request
                        • lead dev: merge/rebase, push to central repo
dinsdag 18 oktober 11
workflows




dinsdag 18 oktober 11
workflows
                        • local clone of your own repo
                          or




dinsdag 18 oktober 11
workflows
                        • local clone of your own repo
                          or
                        • local clone of central repo




dinsdag 18 oktober 11
workflows
                        • local clone of your own repo
                          or
                        • local clone of central repo
                        • work in branch



dinsdag 18 oktober 11
workflows
                        • local clone of your own repo
                          or
                        • local clone of central repo
                        • work in branch
                        • push branch


dinsdag 18 oktober 11
workflows
                        • local clone of your own repo
                          or
                        • local clone of central repo
                        • work in branch
                        • push branch
                        • lead dev: merge/rebase, push to master
dinsdag 18 oktober 11
workflows

                        • Git on your own
                         • local branch
                         • merge stable to master
                         • push to remote

dinsdag 18 oktober 11
make it a game



dinsdag 18 oktober 11
dinsdag 18 oktober 11
http://gowat.ch/gitgame




dinsdag 18 oktober 11
questions?



dinsdag 18 oktober 11
thank you




dinsdag 18 oktober 11
thank you

                        • http://www.leftontheweb.com/
                        • https://github.com/skoop
                        • http://gowat.ch/gitsheet
                        • http://joind.in/talk/view/3967

dinsdag 18 oktober 11
1 of 112

Recommended

VIP TOUR Madrid. Corporativo. Español by
VIP TOUR Madrid. Corporativo. EspañolVIP TOUR Madrid. Corporativo. Español
VIP TOUR Madrid. Corporativo. EspañolVIP TOUR MADRID
838 views30 slides
RESUMEN DE DAN ALAIN QUIRANTE by
RESUMEN DE DAN ALAIN QUIRANTE RESUMEN DE DAN ALAIN QUIRANTE
RESUMEN DE DAN ALAIN QUIRANTE Dan Alain Quirante
375 views7 slides
PDFMailer (4) by
PDFMailer (4)PDFMailer (4)
PDFMailer (4)Melissa Hyden
173 views1 slide
White paper lync ahorrar costes y recursos gracias a las comunicaciones unifi... by
White paper lync ahorrar costes y recursos gracias a las comunicaciones unifi...White paper lync ahorrar costes y recursos gracias a las comunicaciones unifi...
White paper lync ahorrar costes y recursos gracias a las comunicaciones unifi...Peter Diaz
908 views33 slides
Masterafhandlingen - Kirsten Søndergaard. 15.07.14 by
Masterafhandlingen - Kirsten Søndergaard. 15.07.14Masterafhandlingen - Kirsten Søndergaard. 15.07.14
Masterafhandlingen - Kirsten Søndergaard. 15.07.14Kirsten S
556 views50 slides
123trabajo proyecto construir by
123trabajo proyecto construir123trabajo proyecto construir
123trabajo proyecto construirLuis Alfredo Vasquez
404 views8 slides

More Related Content

Viewers also liked

Deseo Para Powerfriends by
Deseo Para PowerfriendsDeseo Para Powerfriends
Deseo Para PowerfriendsTXIYA
377 views7 slides
Aprueban Reglamento de la Ley Nº 29944-DECRETO SUPREMO Nº 004-2013-ED Ley de ... by
Aprueban Reglamento de la Ley Nº 29944-DECRETO SUPREMO Nº 004-2013-ED Ley de ...Aprueban Reglamento de la Ley Nº 29944-DECRETO SUPREMO Nº 004-2013-ED Ley de ...
Aprueban Reglamento de la Ley Nº 29944-DECRETO SUPREMO Nº 004-2013-ED Ley de ...YONEL VASQUEZ GUERRA
2.3K views28 slides
Manual central telefonica by
Manual central telefonicaManual central telefonica
Manual central telefonicaYivier Libardo Duran Alvear
2.2K views101 slides
BIOMETRICS 2012 - London 2012 by
BIOMETRICS 2012 - London 2012BIOMETRICS 2012 - London 2012
BIOMETRICS 2012 - London 2012augmentiq
578 views14 slides
Welding Inspector BWI (6) by
Welding Inspector BWI (6)Welding Inspector BWI (6)
Welding Inspector BWI (6)Dennis Palevino
392 views4 slides
Presentación aula tecnologia by
Presentación aula tecnologiaPresentación aula tecnologia
Presentación aula tecnologiapitagoras1957
341 views27 slides

Viewers also liked(19)

Deseo Para Powerfriends by TXIYA
Deseo Para PowerfriendsDeseo Para Powerfriends
Deseo Para Powerfriends
TXIYA377 views
Aprueban Reglamento de la Ley Nº 29944-DECRETO SUPREMO Nº 004-2013-ED Ley de ... by YONEL VASQUEZ GUERRA
Aprueban Reglamento de la Ley Nº 29944-DECRETO SUPREMO Nº 004-2013-ED Ley de ...Aprueban Reglamento de la Ley Nº 29944-DECRETO SUPREMO Nº 004-2013-ED Ley de ...
Aprueban Reglamento de la Ley Nº 29944-DECRETO SUPREMO Nº 004-2013-ED Ley de ...
BIOMETRICS 2012 - London 2012 by augmentiq
BIOMETRICS 2012 - London 2012BIOMETRICS 2012 - London 2012
BIOMETRICS 2012 - London 2012
augmentiq578 views
Presentación aula tecnologia by pitagoras1957
Presentación aula tecnologiaPresentación aula tecnologia
Presentación aula tecnologia
pitagoras1957341 views
La Kaja Publicidad 2010 by jmolea83
La Kaja Publicidad 2010La Kaja Publicidad 2010
La Kaja Publicidad 2010
jmolea83466 views
The Digital Grain Size Project: grain size estimates from images of sediment by dbuscombe
The Digital Grain Size Project: grain size estimates from images of sedimentThe Digital Grain Size Project: grain size estimates from images of sediment
The Digital Grain Size Project: grain size estimates from images of sediment
dbuscombe1.1K views
Folleto cosechamaiz2007 2008 by Samuel Alcala
Folleto cosechamaiz2007 2008Folleto cosechamaiz2007 2008
Folleto cosechamaiz2007 2008
Samuel Alcala1.3K views
Case Study -- Email Ads Served in Real Time Will Cut Through the Clutter by MediaPost
Case Study -- Email Ads Served in Real Time Will Cut Through the ClutterCase Study -- Email Ads Served in Real Time Will Cut Through the Clutter
Case Study -- Email Ads Served in Real Time Will Cut Through the Clutter
MediaPost5.6K views
Aging Pharma Conference Program - Basel, September 23-24 by Alex Zhavoronkov
Aging Pharma Conference Program - Basel, September 23-24Aging Pharma Conference Program - Basel, September 23-24
Aging Pharma Conference Program - Basel, September 23-24
Alex Zhavoronkov786 views
Bookwatch Vol.20 No.2 (Approved Cover) by Libay Cantor
Bookwatch Vol.20 No.2 (Approved Cover)Bookwatch Vol.20 No.2 (Approved Cover)
Bookwatch Vol.20 No.2 (Approved Cover)
Libay Cantor715 views
2014 polymer activation by reducing agent absorption as a flexible tool for t... by Alexandra Bautista
2014 polymer activation by reducing agent absorption as a flexible tool for t...2014 polymer activation by reducing agent absorption as a flexible tool for t...
2014 polymer activation by reducing agent absorption as a flexible tool for t...
Alexandra Bautista1.5K views
Losmodelospedagógicos (2) by ies jose cubas
Losmodelospedagógicos (2)Losmodelospedagógicos (2)
Losmodelospedagógicos (2)
ies jose cubas1.9K views

More from Stefan Koopmanschap

A Practical Look At Symfony2 by
A Practical Look At Symfony2A Practical Look At Symfony2
A Practical Look At Symfony2Stefan Koopmanschap
2.4K views117 slides
A Practical Look at Symfony2 (PHPNW11) by
A Practical Look at Symfony2 (PHPNW11)A Practical Look at Symfony2 (PHPNW11)
A Practical Look at Symfony2 (PHPNW11)Stefan Koopmanschap
1.1K views64 slides
Git For Subversion Users (PHPNW11) by
Git For Subversion Users (PHPNW11)Git For Subversion Users (PHPNW11)
Git For Subversion Users (PHPNW11)Stefan Koopmanschap
1.1K views68 slides
Conference Speaking 101 by
Conference Speaking 101Conference Speaking 101
Conference Speaking 101Stefan Koopmanschap
924 views22 slides
Open Up (International PHP Conference Spring Edition 2011) by
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
855 views21 slides
Git for Subversion Users (phpDay 2011) by
Git for Subversion Users (phpDay 2011)Git for Subversion Users (phpDay 2011)
Git for Subversion Users (phpDay 2011)Stefan Koopmanschap
1.2K views85 slides

More from Stefan Koopmanschap(20)

Open Up (International PHP Conference Spring Edition 2011) by 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)
Integrating symfony and Zend Framework (IPC 2010) by Stefan Koopmanschap
Integrating symfony and Zend Framework (IPC 2010)Integrating symfony and Zend Framework (IPC 2010)
Integrating symfony and Zend Framework (IPC 2010)
Stefan Koopmanschap8.3K views
Integrating symfony and Zend Framework (PHPBarcelona 2009) by Stefan Koopmanschap
Integrating symfony and Zend Framework (PHPBarcelona 2009)Integrating symfony and Zend Framework (PHPBarcelona 2009)
Integrating symfony and Zend Framework (PHPBarcelona 2009)
Stefan Koopmanschap1.8K views
Integrating symfony and Zend Framework (PHPNW09) by Stefan Koopmanschap
Integrating symfony and Zend Framework (PHPNW09)Integrating symfony and Zend Framework (PHPNW09)
Integrating symfony and Zend Framework (PHPNW09)
Stefan Koopmanschap1.1K views
5 essential tools for the PHP Developer on Windows by Stefan Koopmanschap
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
Stefan Koopmanschap9.1K views

Git for Subversion Users (ZendCon 2011)