SlideShare ist ein Scribd-Unternehmen logo
1 von 46
Downloaden Sie, um offline zu lesen
git as a subversion replacement

       it’s kinda like subversion, but more awesome!




Josh Nichols                            technicalpickles.com
Outline

       •   Using how to use git in the same way you've gone
           accustomed to using subversion
       •   Advantages of using git even just like subversion
       •   Open source collaboration
       •   Building rails apps on git




Josh Nichols                                      technicalpickles.com
Some initial setup
       •   Need to setup ~/.gitconfig
       •   Set things like email address and name
       •   Can setup command aliases for more svn like
           commands




Josh Nichols                                        technicalpickles.com
~/.gitconf
[user]                                [color quot;branchquot;]
email = quot;josh@technicalpickles.comquot;     current = yellow reverse
name = quot;Josh Nicholsquot;                   local = yellow
[alias]                                 remote = green

 st = status                         [color quot;diffquot;]

 co = checkout                         meta = yellow bold

 ci = commit                           frag = magenta bold
[color]                                 old = red bold
  branch = auto                         new = green bold
  diff = auto                         [color quot;statusquot;]
  status = auto                         added = yellow
                                        changed = green
                                        untracked = cyan


Josh Nichols                                      technicalpickles.com
Let’s review some subversion
                workflows



Josh Nichols              technicalpickles.com
Initial checkout

                             svn repository



                      checkout


               developer A                developer B




Josh Nichols                                        technicalpickles.com
Commit and update
                             svn repository



                                      update
                       commit


               developer A                developer B




Josh Nichols                                       technicalpickles.com
Branching
                                  svn repository



                              cp
               sw


                    developer A                developer B




Josh Nichols                                             technicalpickles.com
Alright, let’s see the
            commands


Josh Nichols           technicalpickles.com
Initial checkout

       •   subversion:
           •   svn checkout http://somewhere.com/repo
       •   git:
           •   git clone http://somewhere.com/repo.git




Josh Nichols                                      technicalpickles.com
Initial checkout

                        svn repository                                git repository



                                                                 clone
                 checkout


                                                        developer A                    developer B
          developer A                developer B




Josh Nichols                                                                 technicalpickles.com
Differences between a checked-out
                       repository
       •   subversion:
           •   keeps a copy of the last revision from repo
       •   git:
           •   keeps a copy of the entire repo




Josh Nichols                                       technicalpickles.com
Differences between a remote
                            repository

       •   subversion:
           •   can grab any particular path in the repository
       •   git:
           •   can only grab the entire repository
           •   if you copy a checked out repository somewhere,
               you can actually use it as a remote repository



Josh Nichols                                         technicalpickles.com
Adding a file
       •   svn:
           •   svn add path/to/file
       •   git:
           •   git add path/to/file




Josh Nichols                         technicalpickles.com
Differences for adding
      •   svn
          •   used for adding new files
      •   git
          •   used for adding new files AND recording
              modifications to existing files




Josh Nichols                                    technicalpickles.com
Status
       •   svn:
           •   svn st
       •   git:
           •   git st




Josh Nichols                     technicalpickles.com
Differences for status
       •   svn:
           •   tracks: unversioned, new, deleted, modified
       •   git:
           •   tracks: unversioned, new, deleted, modified, modified
               but not ‘add’-ed




Josh Nichols                                       technicalpickles.com
Committing
       •   svn:
           •   svn commit
       •   git:
           •   git commit
       •   both:
           •   can specify files to commit
           •   can give commit message with -m

Josh Nichols                                     technicalpickles.com
Commit
                         svn repository
                                                                            git repository



                                                     commit
                   commit


           developer A                developer B             developer A                    developer B




Josh Nichols                                                                       technicalpickles.com
Differences for committing
       •   svn:
           •   sends changes to remote repository
           •   revision number is incrementing integer
       •   git:
           •   only commits to local repository
           •   revision number is hash of the commit



Josh Nichols                                        technicalpickles.com
Pushing to a remote
                       repository
       •   svn:
           •   svn commit
       •   git:
           •   git push




Josh Nichols                      technicalpickles.com
Push
                         svn repository
                                                                         git repository



                   commit                                           push


           developer A                developer B          developer A                    developer B




Josh Nichols                                                                    technicalpickles.com
Diff
       •   svn
           •   svn diff
       •   git
           •   git diff




Josh Nichols                     technicalpickles.com
Differences for diff
       •   svn
           •   must be online
       •   git
           •   can be offline




Josh Nichols                         technicalpickles.com
Reverting
       •   svn
           •   svn revert some_file
       •   git
           •   git checkout some_file
           •   yeah, it’s not so obvious




Josh Nichols                               technicalpickles.com
Differences for reverting
       •   git
           •   you don’t ‘revert’ as much as you ‘checkout’ a
               version of the last committed change




Josh Nichols                                        technicalpickles.com
Updating
       •   svn
           •   svn update
       •   git
           •   svn pull




Josh Nichols                           technicalpickles.com
Update
                         svn repository
                                                                           git repository


                                  update
                                                                                        pull


           developer A                developer B            developer A                    developer B




Josh Nichols                                                                      technicalpickles.com
Conflict resolution
       •   Mostly the same
           •   <<<<<
           •   =====
           •   >>>>>




Josh Nichols                     technicalpickles.com
Branching
       •   svn
           •   svn cp . http://somewhere.com/repo/branch/blarg
           •   svn sw --relocate http://somewhere.com/repo/
               branch/blarg .
       •   git
           •   git branch blarg
           •   git checkout blarg


Josh Nichols                                      technicalpickles.com
Branching
                            svn repository                                         git repository



                                                       checkout -b
                        cp
         sw

                                                                     developer A                    developer B
              developer A                developer B




Josh Nichols                                                                             technicalpickles.com
Differences for branching
       •   svn
           •   makes changes immediately to remote repo
       •   git
           •   local repository only
           •   ‘git push origin blarg’ to send to remote




Josh Nichols                                        technicalpickles.com
Summary so far
       •   There are a lot of similarities between svn/git
       •   Main differences so far:
           •   online v. offline
           •   commits v. push
           •   changesets
       •   Questions?



Josh Nichols                                      technicalpickles.com
Git hosting solution
        •   Self-hosted
            •   by hand
            •   gitosis
        •   Hosted
            •   gitorious
            •   repo.or.cz
            •   GitHub

Josh Nichols                      technicalpickles.com
Ok, so what’s better
           about git?


Josh Nichols        technicalpickles.com
My stash
       •   svn
           •   svn diff > changes.diff
           •   svn revert -R .
       •   git
           •   git stash save




Josh Nichols                                technicalpickles.com
Offline committing
       •   Extremely, extremely useful
       •   Something appealing about committing from the beach
           without internet access




Josh Nichols                                   technicalpickles.com
Branching
       •   It actually works really well
       •   Can merge between branches as much as you want
           •   Don’t need to worry about specific revisions
       •   Encourages more branching
           •   fix branches, feature branches




Josh Nichols                                      technicalpickles.com
Using a fix branch
       •   git checkout -b amazing_fixes
       •   make changes
       •   git commit -m “I fixed the hell out of this bug”
       •   git checkout master
       •   git merge amazing_fixes
       •   git push



Josh Nichols                                      technicalpickles.com
Distributed
      •   Can work with multiple remote repositories
          •   push or pull




Josh Nichols                                  technicalpickles.com
One repository to rule them all




                                           Push                     Push



                            Core contributor                            Core contributor


                                                                                 Email patch
                                                                    Pull
                          Pull


                                                                                    Random contributor
           Random contributor       Pull          Random contributor




Josh Nichols                                                                        technicalpickles.com
Subversiveness
       •   Play with subversion and cvs repositories using git!
           •   git svn clone http://somewhere.com/repo
           •   git svn dcommit
               •   replays all your git commits as svn commits
           •   git svn rebase
               •   replays remote commits as git commits locally



Josh Nichols                                         technicalpickles.com
Open source collaboration
       •   With subversion, only ‘authorized’ users can ‘commit’
       •   As a non-committer, can’t make incremental changes
           towards a big refactorings
       •   Typically would send patches around... problematic to
           make sure they are up to date




Josh Nichols                                     technicalpickles.com
Open source collaboration
       •   git and github solve all these concerns
       •   behold, live demo!




Josh Nichols                                         technicalpickles.com
Rails development
       •   Rails 2.1 it supports out of the box (script/install)
       •   Piston 1.9.x supports it
       •   LIVE DEMO!!!!1one




Josh Nichols                                        technicalpickles.com
Fin.


Josh Nichols          technicalpickles.com

Weitere ähnliche Inhalte

Was ist angesagt?

Git One Day Training Notes
Git One Day Training NotesGit One Day Training Notes
Git One Day Training Notesglen_a_smith
 
Git and GitHub
Git and GitHubGit and GitHub
Git and GitHubJames Gray
 
Check the version with fixes. Link in description
Check the version with fixes. Link in descriptionCheck the version with fixes. Link in description
Check the version with fixes. Link in descriptionPrzemyslaw Koltermann
 
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...Puppet
 
GIT, RVM, FIRST HEROKU APP
GIT, RVM, FIRST HEROKU APPGIT, RVM, FIRST HEROKU APP
GIT, RVM, FIRST HEROKU APPPavel Tyk
 
Distributed Developer Workflows using Git
Distributed Developer Workflows using GitDistributed Developer Workflows using Git
Distributed Developer Workflows using GitSusan Potter
 
Understanding about git
Understanding about gitUnderstanding about git
Understanding about gitSothearin Ren
 
GIT | Distributed Version Control System
GIT | Distributed Version Control SystemGIT | Distributed Version Control System
GIT | Distributed Version Control SystemMohammad Imam Hossain
 
Inside Sqale's Backend at Sapporo Ruby Kaigi 2012
Inside Sqale's Backend at Sapporo Ruby Kaigi 2012Inside Sqale's Backend at Sapporo Ruby Kaigi 2012
Inside Sqale's Backend at Sapporo Ruby Kaigi 2012Gosuke Miyashita
 
Puppet at GitHub - PuppetConf 2013
Puppet at GitHub - PuppetConf 2013Puppet at GitHub - PuppetConf 2013
Puppet at GitHub - PuppetConf 2013Puppet
 
Asynchronous Systems with Fn Flow
Asynchronous Systems with Fn FlowAsynchronous Systems with Fn Flow
Asynchronous Systems with Fn FlowJosé Paumard
 

Was ist angesagt? (20)

390a gitintro 12au
390a gitintro 12au390a gitintro 12au
390a gitintro 12au
 
Git One Day Training Notes
Git One Day Training NotesGit One Day Training Notes
Git One Day Training Notes
 
Git and GitHub
Git and GitHubGit and GitHub
Git and GitHub
 
Becoming a Git Master
Becoming a Git MasterBecoming a Git Master
Becoming a Git Master
 
Git and GitHub
Git and GitHubGit and GitHub
Git and GitHub
 
Docker perl build
Docker perl buildDocker perl build
Docker perl build
 
Check the version with fixes. Link in description
Check the version with fixes. Link in descriptionCheck the version with fixes. Link in description
Check the version with fixes. Link in description
 
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...
 
GIT, RVM, FIRST HEROKU APP
GIT, RVM, FIRST HEROKU APPGIT, RVM, FIRST HEROKU APP
GIT, RVM, FIRST HEROKU APP
 
Distributed Developer Workflows using Git
Distributed Developer Workflows using GitDistributed Developer Workflows using Git
Distributed Developer Workflows using Git
 
Understanding about git
Understanding about gitUnderstanding about git
Understanding about git
 
Git::Hooks
Git::HooksGit::Hooks
Git::Hooks
 
Introduction to Git and GitHub
Introduction to Git and GitHubIntroduction to Git and GitHub
Introduction to Git and GitHub
 
Git training
Git trainingGit training
Git training
 
GIT | Distributed Version Control System
GIT | Distributed Version Control SystemGIT | Distributed Version Control System
GIT | Distributed Version Control System
 
Inside Sqale's Backend at Sapporo Ruby Kaigi 2012
Inside Sqale's Backend at Sapporo Ruby Kaigi 2012Inside Sqale's Backend at Sapporo Ruby Kaigi 2012
Inside Sqale's Backend at Sapporo Ruby Kaigi 2012
 
Puppet at GitHub - PuppetConf 2013
Puppet at GitHub - PuppetConf 2013Puppet at GitHub - PuppetConf 2013
Puppet at GitHub - PuppetConf 2013
 
Git internals
Git internalsGit internals
Git internals
 
Asynchronous Systems with Fn Flow
Asynchronous Systems with Fn FlowAsynchronous Systems with Fn Flow
Asynchronous Systems with Fn Flow
 
Docker in practice
Docker in practiceDocker in practice
Docker in practice
 

Andere mochten auch

Festejo y Despedida
Festejo y DespedidaFestejo y Despedida
Festejo y DespedidaRed RADAR
 
Next Library Unconference 05 07 09
Next Library Unconference 05 07 09Next Library Unconference 05 07 09
Next Library Unconference 05 07 09pasdbp
 
Introduction to MindTech - NIHR Health Technology Co-operative in mental health
Introduction to MindTech - NIHR Health Technology Co-operative in mental health Introduction to MindTech - NIHR Health Technology Co-operative in mental health
Introduction to MindTech - NIHR Health Technology Co-operative in mental health NIHR_MindTech
 
Futbol temporada 1992 1993
Futbol temporada 1992 1993Futbol temporada 1992 1993
Futbol temporada 1992 1993miguelmedina1965
 
Successful ChaRM Implementation
Successful ChaRM ImplementationSuccessful ChaRM Implementation
Successful ChaRM ImplementationAlpha Sirius
 
Informe sobre trámites legales de súper tiendas olímpica
Informe sobre trámites legales de súper tiendas olímpicaInforme sobre trámites legales de súper tiendas olímpica
Informe sobre trámites legales de súper tiendas olímpicaChristian Lopez
 
Testes gerais extensivo e intensivo
Testes gerais   extensivo e intensivoTestes gerais   extensivo e intensivo
Testes gerais extensivo e intensivoMário Campos
 
Integria IMS Presentation
Integria IMS PresentationIntegria IMS Presentation
Integria IMS PresentationPandora FMS
 
regiolog.com - Regionales Wissensmanagement
regiolog.com - Regionales Wissensmanagementregiolog.com - Regionales Wissensmanagement
regiolog.com - Regionales WissensmanagementSimon Dueckert
 
TEORIA DE ESTRUCTURAS-METODO DE CROSS-PROBLEMAS PROPUESTOS
TEORIA DE ESTRUCTURAS-METODO DE CROSS-PROBLEMAS PROPUESTOSTEORIA DE ESTRUCTURAS-METODO DE CROSS-PROBLEMAS PROPUESTOS
TEORIA DE ESTRUCTURAS-METODO DE CROSS-PROBLEMAS PROPUESTOSOfinalca/Santa Teresa del Tuy
 
Git vs SVN
Git vs SVNGit vs SVN
Git vs SVNneuros
 
Lista de verificação super completa (check list)
Lista de verificação super completa (check list)Lista de verificação super completa (check list)
Lista de verificação super completa (check list)Robson Peixoto
 

Andere mochten auch (20)

Festejo y Despedida
Festejo y DespedidaFestejo y Despedida
Festejo y Despedida
 
Next Library Unconference 05 07 09
Next Library Unconference 05 07 09Next Library Unconference 05 07 09
Next Library Unconference 05 07 09
 
Manual de excel
Manual de excelManual de excel
Manual de excel
 
Artez202
Artez202Artez202
Artez202
 
Introduction to MindTech - NIHR Health Technology Co-operative in mental health
Introduction to MindTech - NIHR Health Technology Co-operative in mental health Introduction to MindTech - NIHR Health Technology Co-operative in mental health
Introduction to MindTech - NIHR Health Technology Co-operative in mental health
 
Creative commons
Creative commonsCreative commons
Creative commons
 
Field services
Field servicesField services
Field services
 
Futbol temporada 1992 1993
Futbol temporada 1992 1993Futbol temporada 1992 1993
Futbol temporada 1992 1993
 
Anhad farm brochure
Anhad farm brochureAnhad farm brochure
Anhad farm brochure
 
Successful ChaRM Implementation
Successful ChaRM ImplementationSuccessful ChaRM Implementation
Successful ChaRM Implementation
 
Informe sobre trámites legales de súper tiendas olímpica
Informe sobre trámites legales de súper tiendas olímpicaInforme sobre trámites legales de súper tiendas olímpica
Informe sobre trámites legales de súper tiendas olímpica
 
Testes gerais extensivo e intensivo
Testes gerais   extensivo e intensivoTestes gerais   extensivo e intensivo
Testes gerais extensivo e intensivo
 
Integria IMS Presentation
Integria IMS PresentationIntegria IMS Presentation
Integria IMS Presentation
 
Cien Águilas 2008
Cien Águilas 2008Cien Águilas 2008
Cien Águilas 2008
 
SVN 2 Git
SVN 2 GitSVN 2 Git
SVN 2 Git
 
regiolog.com - Regionales Wissensmanagement
regiolog.com - Regionales Wissensmanagementregiolog.com - Regionales Wissensmanagement
regiolog.com - Regionales Wissensmanagement
 
TEORIA DE ESTRUCTURAS-METODO DE CROSS-PROBLEMAS PROPUESTOS
TEORIA DE ESTRUCTURAS-METODO DE CROSS-PROBLEMAS PROPUESTOSTEORIA DE ESTRUCTURAS-METODO DE CROSS-PROBLEMAS PROPUESTOS
TEORIA DE ESTRUCTURAS-METODO DE CROSS-PROBLEMAS PROPUESTOS
 
Seminar Paper
Seminar PaperSeminar Paper
Seminar Paper
 
Git vs SVN
Git vs SVNGit vs SVN
Git vs SVN
 
Lista de verificação super completa (check list)
Lista de verificação super completa (check list)Lista de verificação super completa (check list)
Lista de verificação super completa (check list)
 

Ähnlich wie Git As A Subversion Replacement

Deployment With Subversion - Lorna Mitchell
Deployment With Subversion - Lorna MitchellDeployment With Subversion - Lorna Mitchell
Deployment With Subversion - Lorna Mitchelldpc
 
PHP Deployment With SVN
PHP Deployment With SVNPHP Deployment With SVN
PHP Deployment With SVNLorna Mitchell
 
Git Started With Git
Git Started With GitGit Started With Git
Git Started With GitNick Quaranto
 
Version Control with SVN
Version Control with SVNVersion Control with SVN
Version Control with SVNPHPBelgium
 
Built in ci-cd with kubernetes, jenkins and helm
Built in ci-cd with kubernetes, jenkins and helmBuilt in ci-cd with kubernetes, jenkins and helm
Built in ci-cd with kubernetes, jenkins and helmPau López
 
Git - Intro to the Basics of DVCS
Git - Intro to the Basics of DVCSGit - Intro to the Basics of DVCS
Git - Intro to the Basics of DVCSMatthew McCullough
 
Git - Intro to the Basics of DVCS
Git - Intro to the Basics of DVCSGit - Intro to the Basics of DVCS
Git - Intro to the Basics of DVCSMatthew McCullough
 
JUC Europe 2015: A Reproducible Build Environment with Jenkins
JUC Europe 2015: A Reproducible Build Environment with JenkinsJUC Europe 2015: A Reproducible Build Environment with Jenkins
JUC Europe 2015: A Reproducible Build Environment with JenkinsCloudBees
 
Building a Solr Continuous Delivery Pipeline with Jenkins: Presented by James...
Building a Solr Continuous Delivery Pipeline with Jenkins: Presented by James...Building a Solr Continuous Delivery Pipeline with Jenkins: Presented by James...
Building a Solr Continuous Delivery Pipeline with Jenkins: Presented by James...Lucidworks
 

Ähnlich wie Git As A Subversion Replacement (20)

Deployment With Subversion - Lorna Mitchell
Deployment With Subversion - Lorna MitchellDeployment With Subversion - Lorna Mitchell
Deployment With Subversion - Lorna Mitchell
 
Git
GitGit
Git
 
Git Going With DVCS v1.5.2
Git Going With DVCS v1.5.2Git Going With DVCS v1.5.2
Git Going With DVCS v1.5.2
 
PHP Deployment With SVN
PHP Deployment With SVNPHP Deployment With SVN
PHP Deployment With SVN
 
Git Going with DVCS v1.6.0
Git Going with DVCS v1.6.0Git Going with DVCS v1.6.0
Git Going with DVCS v1.6.0
 
Git Started With Git
Git Started With GitGit Started With Git
Git Started With Git
 
Travis CI
Travis CITravis CI
Travis CI
 
Git Going With DVCS v1.5.1
Git Going With DVCS v1.5.1Git Going With DVCS v1.5.1
Git Going With DVCS v1.5.1
 
Version Control with SVN
Version Control with SVNVersion Control with SVN
Version Control with SVN
 
Git+jenkins+rex presentation
Git+jenkins+rex presentationGit+jenkins+rex presentation
Git+jenkins+rex presentation
 
Git introduction
Git introductionGit introduction
Git introduction
 
Git
GitGit
Git
 
Built in ci-cd with kubernetes, jenkins and helm
Built in ci-cd with kubernetes, jenkins and helmBuilt in ci-cd with kubernetes, jenkins and helm
Built in ci-cd with kubernetes, jenkins and helm
 
Git - Intro to the Basics of DVCS
Git - Intro to the Basics of DVCSGit - Intro to the Basics of DVCS
Git - Intro to the Basics of DVCS
 
Git - Intro to the Basics of DVCS
Git - Intro to the Basics of DVCSGit - Intro to the Basics of DVCS
Git - Intro to the Basics of DVCS
 
JUC Europe 2015: A Reproducible Build Environment with Jenkins
JUC Europe 2015: A Reproducible Build Environment with JenkinsJUC Europe 2015: A Reproducible Build Environment with Jenkins
JUC Europe 2015: A Reproducible Build Environment with Jenkins
 
Git
GitGit
Git
 
Git
GitGit
Git
 
Building a Solr Continuous Delivery Pipeline with Jenkins: Presented by James...
Building a Solr Continuous Delivery Pipeline with Jenkins: Presented by James...Building a Solr Continuous Delivery Pipeline with Jenkins: Presented by James...
Building a Solr Continuous Delivery Pipeline with Jenkins: Presented by James...
 
Introduction To Git
Introduction To GitIntroduction To Git
Introduction To Git
 

Kürzlich hochgeladen

Healthcare Feb. & Mar. Healthcare Newsletter
Healthcare Feb. & Mar. Healthcare NewsletterHealthcare Feb. & Mar. Healthcare Newsletter
Healthcare Feb. & Mar. Healthcare NewsletterJamesConcepcion7
 
Intermediate Accounting, Volume 2, 13th Canadian Edition by Donald E. Kieso t...
Intermediate Accounting, Volume 2, 13th Canadian Edition by Donald E. Kieso t...Intermediate Accounting, Volume 2, 13th Canadian Edition by Donald E. Kieso t...
Intermediate Accounting, Volume 2, 13th Canadian Edition by Donald E. Kieso t...ssuserf63bd7
 
Horngren’s Financial & Managerial Accounting, 7th edition by Miller-Nobles so...
Horngren’s Financial & Managerial Accounting, 7th edition by Miller-Nobles so...Horngren’s Financial & Managerial Accounting, 7th edition by Miller-Nobles so...
Horngren’s Financial & Managerial Accounting, 7th edition by Miller-Nobles so...ssuserf63bd7
 
Psychic Reading | Spiritual Guidance – Astro Ganesh Ji
Psychic Reading | Spiritual Guidance – Astro Ganesh JiPsychic Reading | Spiritual Guidance – Astro Ganesh Ji
Psychic Reading | Spiritual Guidance – Astro Ganesh Jiastral oracle
 
Data Analytics Strategy Toolkit and Templates
Data Analytics Strategy Toolkit and TemplatesData Analytics Strategy Toolkit and Templates
Data Analytics Strategy Toolkit and TemplatesAurelien Domont, MBA
 
Driving Business Impact for PMs with Jon Harmer
Driving Business Impact for PMs with Jon HarmerDriving Business Impact for PMs with Jon Harmer
Driving Business Impact for PMs with Jon HarmerAggregage
 
Interoperability and ecosystems: Assembling the industrial metaverse
Interoperability and ecosystems:  Assembling the industrial metaverseInteroperability and ecosystems:  Assembling the industrial metaverse
Interoperability and ecosystems: Assembling the industrial metaverseSiemens
 
The-Ethical-issues-ghhhhhhhhjof-Byjus.pptx
The-Ethical-issues-ghhhhhhhhjof-Byjus.pptxThe-Ethical-issues-ghhhhhhhhjof-Byjus.pptx
The-Ethical-issues-ghhhhhhhhjof-Byjus.pptxmbikashkanyari
 
Guide Complete Set of Residential Architectural Drawings PDF
Guide Complete Set of Residential Architectural Drawings PDFGuide Complete Set of Residential Architectural Drawings PDF
Guide Complete Set of Residential Architectural Drawings PDFChandresh Chudasama
 
digital marketing , introduction of digital marketing
digital marketing , introduction of digital marketingdigital marketing , introduction of digital marketing
digital marketing , introduction of digital marketingrajputmeenakshi733
 
Types of Cyberattacks - ASG I.T. Consulting.pdf
Types of Cyberattacks - ASG I.T. Consulting.pdfTypes of Cyberattacks - ASG I.T. Consulting.pdf
Types of Cyberattacks - ASG I.T. Consulting.pdfASGITConsulting
 
Excvation Safety for safety officers reference
Excvation Safety for safety officers referenceExcvation Safety for safety officers reference
Excvation Safety for safety officers referencessuser2c065e
 
TriStar Gold Corporate Presentation - April 2024
TriStar Gold Corporate Presentation - April 2024TriStar Gold Corporate Presentation - April 2024
TriStar Gold Corporate Presentation - April 2024Adnet Communications
 
Darshan Hiranandani [News About Next CEO].pdf
Darshan Hiranandani [News About Next CEO].pdfDarshan Hiranandani [News About Next CEO].pdf
Darshan Hiranandani [News About Next CEO].pdfShashank Mehta
 
business environment micro environment macro environment.pptx
business environment micro environment macro environment.pptxbusiness environment micro environment macro environment.pptx
business environment micro environment macro environment.pptxShruti Mittal
 
PSCC - Capability Statement Presentation
PSCC - Capability Statement PresentationPSCC - Capability Statement Presentation
PSCC - Capability Statement PresentationAnamaria Contreras
 
Appkodes Tinder Clone Script with Customisable Solutions.pptx
Appkodes Tinder Clone Script with Customisable Solutions.pptxAppkodes Tinder Clone Script with Customisable Solutions.pptx
Appkodes Tinder Clone Script with Customisable Solutions.pptxappkodes
 
Welding Electrode Making Machine By Deccan Dynamics
Welding Electrode Making Machine By Deccan DynamicsWelding Electrode Making Machine By Deccan Dynamics
Welding Electrode Making Machine By Deccan DynamicsIndiaMART InterMESH Limited
 
Effective Strategies for Maximizing Your Profit When Selling Gold Jewelry
Effective Strategies for Maximizing Your Profit When Selling Gold JewelryEffective Strategies for Maximizing Your Profit When Selling Gold Jewelry
Effective Strategies for Maximizing Your Profit When Selling Gold JewelryWhittensFineJewelry1
 

Kürzlich hochgeladen (20)

Healthcare Feb. & Mar. Healthcare Newsletter
Healthcare Feb. & Mar. Healthcare NewsletterHealthcare Feb. & Mar. Healthcare Newsletter
Healthcare Feb. & Mar. Healthcare Newsletter
 
Intermediate Accounting, Volume 2, 13th Canadian Edition by Donald E. Kieso t...
Intermediate Accounting, Volume 2, 13th Canadian Edition by Donald E. Kieso t...Intermediate Accounting, Volume 2, 13th Canadian Edition by Donald E. Kieso t...
Intermediate Accounting, Volume 2, 13th Canadian Edition by Donald E. Kieso t...
 
Horngren’s Financial & Managerial Accounting, 7th edition by Miller-Nobles so...
Horngren’s Financial & Managerial Accounting, 7th edition by Miller-Nobles so...Horngren’s Financial & Managerial Accounting, 7th edition by Miller-Nobles so...
Horngren’s Financial & Managerial Accounting, 7th edition by Miller-Nobles so...
 
Psychic Reading | Spiritual Guidance – Astro Ganesh Ji
Psychic Reading | Spiritual Guidance – Astro Ganesh JiPsychic Reading | Spiritual Guidance – Astro Ganesh Ji
Psychic Reading | Spiritual Guidance – Astro Ganesh Ji
 
Data Analytics Strategy Toolkit and Templates
Data Analytics Strategy Toolkit and TemplatesData Analytics Strategy Toolkit and Templates
Data Analytics Strategy Toolkit and Templates
 
Driving Business Impact for PMs with Jon Harmer
Driving Business Impact for PMs with Jon HarmerDriving Business Impact for PMs with Jon Harmer
Driving Business Impact for PMs with Jon Harmer
 
Interoperability and ecosystems: Assembling the industrial metaverse
Interoperability and ecosystems:  Assembling the industrial metaverseInteroperability and ecosystems:  Assembling the industrial metaverse
Interoperability and ecosystems: Assembling the industrial metaverse
 
The-Ethical-issues-ghhhhhhhhjof-Byjus.pptx
The-Ethical-issues-ghhhhhhhhjof-Byjus.pptxThe-Ethical-issues-ghhhhhhhhjof-Byjus.pptx
The-Ethical-issues-ghhhhhhhhjof-Byjus.pptx
 
Guide Complete Set of Residential Architectural Drawings PDF
Guide Complete Set of Residential Architectural Drawings PDFGuide Complete Set of Residential Architectural Drawings PDF
Guide Complete Set of Residential Architectural Drawings PDF
 
digital marketing , introduction of digital marketing
digital marketing , introduction of digital marketingdigital marketing , introduction of digital marketing
digital marketing , introduction of digital marketing
 
Types of Cyberattacks - ASG I.T. Consulting.pdf
Types of Cyberattacks - ASG I.T. Consulting.pdfTypes of Cyberattacks - ASG I.T. Consulting.pdf
Types of Cyberattacks - ASG I.T. Consulting.pdf
 
The Bizz Quiz-E-Summit-E-Cell-IITPatna.pptx
The Bizz Quiz-E-Summit-E-Cell-IITPatna.pptxThe Bizz Quiz-E-Summit-E-Cell-IITPatna.pptx
The Bizz Quiz-E-Summit-E-Cell-IITPatna.pptx
 
Excvation Safety for safety officers reference
Excvation Safety for safety officers referenceExcvation Safety for safety officers reference
Excvation Safety for safety officers reference
 
TriStar Gold Corporate Presentation - April 2024
TriStar Gold Corporate Presentation - April 2024TriStar Gold Corporate Presentation - April 2024
TriStar Gold Corporate Presentation - April 2024
 
Darshan Hiranandani [News About Next CEO].pdf
Darshan Hiranandani [News About Next CEO].pdfDarshan Hiranandani [News About Next CEO].pdf
Darshan Hiranandani [News About Next CEO].pdf
 
business environment micro environment macro environment.pptx
business environment micro environment macro environment.pptxbusiness environment micro environment macro environment.pptx
business environment micro environment macro environment.pptx
 
PSCC - Capability Statement Presentation
PSCC - Capability Statement PresentationPSCC - Capability Statement Presentation
PSCC - Capability Statement Presentation
 
Appkodes Tinder Clone Script with Customisable Solutions.pptx
Appkodes Tinder Clone Script with Customisable Solutions.pptxAppkodes Tinder Clone Script with Customisable Solutions.pptx
Appkodes Tinder Clone Script with Customisable Solutions.pptx
 
Welding Electrode Making Machine By Deccan Dynamics
Welding Electrode Making Machine By Deccan DynamicsWelding Electrode Making Machine By Deccan Dynamics
Welding Electrode Making Machine By Deccan Dynamics
 
Effective Strategies for Maximizing Your Profit When Selling Gold Jewelry
Effective Strategies for Maximizing Your Profit When Selling Gold JewelryEffective Strategies for Maximizing Your Profit When Selling Gold Jewelry
Effective Strategies for Maximizing Your Profit When Selling Gold Jewelry
 

Git As A Subversion Replacement

  • 1. git as a subversion replacement it’s kinda like subversion, but more awesome! Josh Nichols technicalpickles.com
  • 2. Outline • Using how to use git in the same way you've gone accustomed to using subversion • Advantages of using git even just like subversion • Open source collaboration • Building rails apps on git Josh Nichols technicalpickles.com
  • 3. Some initial setup • Need to setup ~/.gitconfig • Set things like email address and name • Can setup command aliases for more svn like commands Josh Nichols technicalpickles.com
  • 4. ~/.gitconf [user] [color quot;branchquot;] email = quot;josh@technicalpickles.comquot; current = yellow reverse name = quot;Josh Nicholsquot; local = yellow [alias] remote = green st = status [color quot;diffquot;] co = checkout meta = yellow bold ci = commit frag = magenta bold [color] old = red bold branch = auto new = green bold diff = auto [color quot;statusquot;] status = auto added = yellow changed = green untracked = cyan Josh Nichols technicalpickles.com
  • 5. Let’s review some subversion workflows Josh Nichols technicalpickles.com
  • 6. Initial checkout svn repository checkout developer A developer B Josh Nichols technicalpickles.com
  • 7. Commit and update svn repository update commit developer A developer B Josh Nichols technicalpickles.com
  • 8. Branching svn repository cp sw developer A developer B Josh Nichols technicalpickles.com
  • 9. Alright, let’s see the commands Josh Nichols technicalpickles.com
  • 10. Initial checkout • subversion: • svn checkout http://somewhere.com/repo • git: • git clone http://somewhere.com/repo.git Josh Nichols technicalpickles.com
  • 11. Initial checkout svn repository git repository clone checkout developer A developer B developer A developer B Josh Nichols technicalpickles.com
  • 12. Differences between a checked-out repository • subversion: • keeps a copy of the last revision from repo • git: • keeps a copy of the entire repo Josh Nichols technicalpickles.com
  • 13. Differences between a remote repository • subversion: • can grab any particular path in the repository • git: • can only grab the entire repository • if you copy a checked out repository somewhere, you can actually use it as a remote repository Josh Nichols technicalpickles.com
  • 14. Adding a file • svn: • svn add path/to/file • git: • git add path/to/file Josh Nichols technicalpickles.com
  • 15. Differences for adding • svn • used for adding new files • git • used for adding new files AND recording modifications to existing files Josh Nichols technicalpickles.com
  • 16. Status • svn: • svn st • git: • git st Josh Nichols technicalpickles.com
  • 17. Differences for status • svn: • tracks: unversioned, new, deleted, modified • git: • tracks: unversioned, new, deleted, modified, modified but not ‘add’-ed Josh Nichols technicalpickles.com
  • 18. Committing • svn: • svn commit • git: • git commit • both: • can specify files to commit • can give commit message with -m Josh Nichols technicalpickles.com
  • 19. Commit svn repository git repository commit commit developer A developer B developer A developer B Josh Nichols technicalpickles.com
  • 20. Differences for committing • svn: • sends changes to remote repository • revision number is incrementing integer • git: • only commits to local repository • revision number is hash of the commit Josh Nichols technicalpickles.com
  • 21. Pushing to a remote repository • svn: • svn commit • git: • git push Josh Nichols technicalpickles.com
  • 22. Push svn repository git repository commit push developer A developer B developer A developer B Josh Nichols technicalpickles.com
  • 23. Diff • svn • svn diff • git • git diff Josh Nichols technicalpickles.com
  • 24. Differences for diff • svn • must be online • git • can be offline Josh Nichols technicalpickles.com
  • 25. Reverting • svn • svn revert some_file • git • git checkout some_file • yeah, it’s not so obvious Josh Nichols technicalpickles.com
  • 26. Differences for reverting • git • you don’t ‘revert’ as much as you ‘checkout’ a version of the last committed change Josh Nichols technicalpickles.com
  • 27. Updating • svn • svn update • git • svn pull Josh Nichols technicalpickles.com
  • 28. Update svn repository git repository update pull developer A developer B developer A developer B Josh Nichols technicalpickles.com
  • 29. Conflict resolution • Mostly the same • <<<<< • ===== • >>>>> Josh Nichols technicalpickles.com
  • 30. Branching • svn • svn cp . http://somewhere.com/repo/branch/blarg • svn sw --relocate http://somewhere.com/repo/ branch/blarg . • git • git branch blarg • git checkout blarg Josh Nichols technicalpickles.com
  • 31. Branching svn repository git repository checkout -b cp sw developer A developer B developer A developer B Josh Nichols technicalpickles.com
  • 32. Differences for branching • svn • makes changes immediately to remote repo • git • local repository only • ‘git push origin blarg’ to send to remote Josh Nichols technicalpickles.com
  • 33. Summary so far • There are a lot of similarities between svn/git • Main differences so far: • online v. offline • commits v. push • changesets • Questions? Josh Nichols technicalpickles.com
  • 34. Git hosting solution • Self-hosted • by hand • gitosis • Hosted • gitorious • repo.or.cz • GitHub Josh Nichols technicalpickles.com
  • 35. Ok, so what’s better about git? Josh Nichols technicalpickles.com
  • 36. My stash • svn • svn diff > changes.diff • svn revert -R . • git • git stash save Josh Nichols technicalpickles.com
  • 37. Offline committing • Extremely, extremely useful • Something appealing about committing from the beach without internet access Josh Nichols technicalpickles.com
  • 38. Branching • It actually works really well • Can merge between branches as much as you want • Don’t need to worry about specific revisions • Encourages more branching • fix branches, feature branches Josh Nichols technicalpickles.com
  • 39. Using a fix branch • git checkout -b amazing_fixes • make changes • git commit -m “I fixed the hell out of this bug” • git checkout master • git merge amazing_fixes • git push Josh Nichols technicalpickles.com
  • 40. Distributed • Can work with multiple remote repositories • push or pull Josh Nichols technicalpickles.com
  • 41. One repository to rule them all Push Push Core contributor Core contributor Email patch Pull Pull Random contributor Random contributor Pull Random contributor Josh Nichols technicalpickles.com
  • 42. Subversiveness • Play with subversion and cvs repositories using git! • git svn clone http://somewhere.com/repo • git svn dcommit • replays all your git commits as svn commits • git svn rebase • replays remote commits as git commits locally Josh Nichols technicalpickles.com
  • 43. Open source collaboration • With subversion, only ‘authorized’ users can ‘commit’ • As a non-committer, can’t make incremental changes towards a big refactorings • Typically would send patches around... problematic to make sure they are up to date Josh Nichols technicalpickles.com
  • 44. Open source collaboration • git and github solve all these concerns • behold, live demo! Josh Nichols technicalpickles.com
  • 45. Rails development • Rails 2.1 it supports out of the box (script/install) • Piston 1.9.x supports it • LIVE DEMO!!!!1one Josh Nichols technicalpickles.com
  • 46. Fin. Josh Nichols technicalpickles.com