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

Más contenido relacionado

Destacado

Deseo Para Powerfriends
Deseo Para PowerfriendsDeseo Para Powerfriends
Deseo Para PowerfriendsTXIYA
 
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 ...
Aprueban Reglamento de la Ley Nº 29944-DECRETO SUPREMO Nº 004-2013-ED Ley de ...YONEL VASQUEZ GUERRA
 
BIOMETRICS 2012 - London 2012
BIOMETRICS 2012 - London 2012BIOMETRICS 2012 - London 2012
BIOMETRICS 2012 - London 2012augmentiq
 
Welding Inspector BWI (6)
Welding Inspector BWI (6)Welding Inspector BWI (6)
Welding Inspector BWI (6)Dennis Palevino
 
Presentación aula tecnologia
Presentación aula tecnologiaPresentación aula tecnologia
Presentación aula tecnologiapitagoras1957
 
La Kaja Publicidad 2010
La Kaja Publicidad 2010La Kaja Publicidad 2010
La Kaja Publicidad 2010jmolea83
 
The Digital Grain Size Project: grain size estimates from images of sediment
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 sedimentdbuscombe
 
Folleto cosechamaiz2007 2008
Folleto cosechamaiz2007 2008Folleto cosechamaiz2007 2008
Folleto cosechamaiz2007 2008Samuel Alcala
 
Case Study -- Email Ads Served in Real Time Will Cut Through the Clutter
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 ClutterMediaPost
 
Aging Pharma Conference Program - Basel, September 23-24
Aging Pharma Conference Program - Basel, September 23-24Aging Pharma Conference Program - Basel, September 23-24
Aging Pharma Conference Program - Basel, September 23-24Alex Zhavoronkov
 
Trabajo herramienta educación y sociedad (2)
Trabajo herramienta educación y sociedad (2)Trabajo herramienta educación y sociedad (2)
Trabajo herramienta educación y sociedad (2)Rocio Hornero Pradas
 
Bookwatch Vol.20 No.2 (Approved Cover)
Bookwatch Vol.20 No.2 (Approved Cover)Bookwatch Vol.20 No.2 (Approved Cover)
Bookwatch Vol.20 No.2 (Approved Cover)Libay Cantor
 
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...
2014 polymer activation by reducing agent absorption as a flexible tool for t...Alexandra Bautista
 
Losmodelospedagógicos (2)
Losmodelospedagógicos (2)Losmodelospedagógicos (2)
Losmodelospedagógicos (2)ies jose cubas
 

Destacado (19)

Deseo Para Powerfriends
Deseo Para PowerfriendsDeseo Para Powerfriends
Deseo Para Powerfriends
 
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 ...
Aprueban Reglamento de la Ley Nº 29944-DECRETO SUPREMO Nº 004-2013-ED Ley de ...
 
Manual central telefonica
Manual central telefonicaManual central telefonica
Manual central telefonica
 
BIOMETRICS 2012 - London 2012
BIOMETRICS 2012 - London 2012BIOMETRICS 2012 - London 2012
BIOMETRICS 2012 - London 2012
 
Welding Inspector BWI (6)
Welding Inspector BWI (6)Welding Inspector BWI (6)
Welding Inspector BWI (6)
 
Presentación aula tecnologia
Presentación aula tecnologiaPresentación aula tecnologia
Presentación aula tecnologia
 
Año 3 número 101
Año 3 número 101Año 3 número 101
Año 3 número 101
 
La Kaja Publicidad 2010
La Kaja Publicidad 2010La Kaja Publicidad 2010
La Kaja Publicidad 2010
 
Curso enfermería en emergencia
Curso enfermería en emergenciaCurso enfermería en emergencia
Curso enfermería en emergencia
 
Public Finance for Planners
Public Finance for PlannersPublic Finance for Planners
Public Finance for Planners
 
The Digital Grain Size Project: grain size estimates from images of sediment
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
 
Folleto cosechamaiz2007 2008
Folleto cosechamaiz2007 2008Folleto cosechamaiz2007 2008
Folleto cosechamaiz2007 2008
 
Case Study -- Email Ads Served in Real Time Will Cut Through the Clutter
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
 
Aging Pharma Conference Program - Basel, September 23-24
Aging Pharma Conference Program - Basel, September 23-24Aging Pharma Conference Program - Basel, September 23-24
Aging Pharma Conference Program - Basel, September 23-24
 
Trabajo herramienta educación y sociedad (2)
Trabajo herramienta educación y sociedad (2)Trabajo herramienta educación y sociedad (2)
Trabajo herramienta educación y sociedad (2)
 
Bookwatch Vol.20 No.2 (Approved Cover)
Bookwatch Vol.20 No.2 (Approved Cover)Bookwatch Vol.20 No.2 (Approved Cover)
Bookwatch Vol.20 No.2 (Approved Cover)
 
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...
2014 polymer activation by reducing agent absorption as a flexible tool for t...
 
11. trombosis venosa cerebral
11. trombosis venosa cerebral11. trombosis venosa cerebral
11. trombosis venosa cerebral
 
Losmodelospedagógicos (2)
Losmodelospedagógicos (2)Losmodelospedagógicos (2)
Losmodelospedagógicos (2)
 

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
 
Git For Subversion Users (PHPNW11)
Git For Subversion Users (PHPNW11)Git For Subversion Users (PHPNW11)
Git For Subversion Users (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
 
Git for Subversion Users (phpDay 2011)
Git for Subversion Users (phpDay 2011)Git for Subversion Users (phpDay 2011)
Git for Subversion Users (phpDay 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
 

Más de Stefan Koopmanschap (20)

A Practical Look At Symfony2
A Practical Look At Symfony2A Practical Look At Symfony2
A Practical Look At Symfony2
 
A Practical Look at Symfony2 (PHPNW11)
A Practical Look at Symfony2 (PHPNW11)A Practical Look at Symfony2 (PHPNW11)
A Practical Look at Symfony2 (PHPNW11)
 
Git For Subversion Users (PHPNW11)
Git For Subversion Users (PHPNW11)Git For Subversion Users (PHPNW11)
Git For Subversion Users (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)
 
Git for Subversion Users (phpDay 2011)
Git for Subversion Users (phpDay 2011)Git for Subversion Users (phpDay 2011)
Git for Subversion Users (phpDay 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
 

Git for Subversion Users (ZendCon 2011)