SlideShare a Scribd company logo
1 of 36
Download to read offline
GIT VS. SVN
Which one should we use and when?
http://www.paradigmatecnologico.com
@paradigmate
http://marianonavas.me
@marianongdev
What is a CVS for?
• Allow team work together and collaborate
• Have some kind of time machine in our code
• Allow CI
Approaches (architectural models)
• Local
• Rcs (Mac OS Developer Tools)
• Centralized
• Subversion
• CVS
• Perforce
• Distributed
• Git
• Mercurial
Approaches (architectural models)
• Local
• Rcs (Mac OS Developer Tools)
• Centralized
• Subversion
• CVS
• Perforce
• Distributed
• Git
• Mercurial
Very good resource
Centralized CVS
Distributed CVS
Centralized
• Pros
• Looks simple
• We know it well; we've been using it for a long time
• Good mainstream IDEs integration
• It works 
• Cons
• We cannot commit offline (well, we can, but …)
• We cannot integrate in our development toolset more than one
repository
• Dificult to collaborate if team is large (i.e. open source projects)
• We are encouraged to avoid branches by the system.
Distributed
• Pros
• Allow offline work
• Easy collaboration model
• Can link as many repositories as we might need
• Almost every operation is local
• Complete copy of the repository in each machine
• Easy installation on server, and plenty of hosting services (free and
paid)
• Cons
• More complex workflow (or not?)
• Difficult to learn
• ?????
Internal representation of data; SVN
Branching in SVN
Branching in SVN
Quotes taken from official svn website
• "For projects that have a large number of contributors, it's common for
most people to have working copies of the trunk. Whenever someone
needs to make a long-running change that is likely to disrupt the
trunk, a standard procedure is to create a private branch and commit
changes there until all the work is complete"
• "The bad news is that it's very easy to drift too far apart (...) it may be
near-impossible to merge your changes back into the trunk without a
huge number of conflicts"
• "Subversion gives you the ability to selectively “copy” changes
between branches. And when you're completely finished with your
branch, your entire set of branch changes can be copied back into the
trunk. In Subversion terminology, the general act of replicating
changes from one branch to another is called merging, and it is
performed using various invocations of the svn merge subcommand”
Branching in SVN I (typical workflow)
• Checkout from trunk.
• Add a new file to working copy
• Check status (svn st).
• Track new file in svn (svn add).
• Commit the new file (svn ci).
• Modify the file, and check status again (svn st).
• Commit the new change.
• Modify again and let it remain modified.
Branching in SVN II (branch & merge)
• Svn copy at server level.
• Check current working copy remote path (svn info).
• Switch to new location (svn switch [remote] .)
• Check remote again (svn info).
• Commit some change to the branch.
• Switch again to trunk.
• Merge trunk with [myNewBranch] (svn merge [source@rev] .).
Note that we do it with the working copy first to merge conflicts
locally.
• Commit to finish merge (we’ve done it locally in the previous
step).
• Again with a non-conflicting change in the same file.
• Again with a conflicting change.
Internal representation of data; svn
• Repository: the main idea
• Working copy
• Revisions, which are deltas of a base state
• The server has to workout deltas to resolve the concrete
state of a revision (commit)
• Each revision gets a unique (secuential) id. This is
possible because it's centralized
• Branches: are light copies of complete working trees
• Summary: branch=copy.
Drawbacks I: only one remote
Drawbacks II: branch & merge sucks
• Recall branch & merge procedure:
• Copy trunk in branch directory in remote server
• Checkout (or switch) locally.
• Inspect revision we want to merge with, if not last.
• Call svn merge.
• Resolve conflicts (if any).
• Commit the whole thing.
• In practice we feel encouraged to not create branches
(bad, bad, bad …).
Drawback III: cleanliness
• What if I want to merge my branch just to get up to date
with our trunk, but I don’t want to make it public yet
(incomplete feature or just playing around)?
Drawback IV: privacy
• Do I have to publish my code to a remote/public server to
have version control? What if I’m doing some experiments
I don’t want other people to see, or I just don’t want to
mess up our central repository with something I don’t
know if it’s going to work?
Internal representation of data; git
Git – file status lifecycle
Git internal storage structure: directed
acyclic graph (DAG)
• http://eagain.net/articles/git-for-computer-scientists/
Branching in git
Deeper insight in git DAG internal
structure
Another view of git objects I
Another view of git objects II
Another view of git objects III
Details on how git stores that in disk
• http://git-scm.com/book/en/Git-Internals-Git-Objects
Branches and HEAD
More on git internal representation of data
• http://eagain.net/articles/git-for-computer-scientists/
• http://en.wikipedia.org/wiki/Directed_acyclic_graph
• Due to its distributed nature unique ids for commits are
generated as SHA-1 digest to ensure unicity
• Explanation
• Snapshots, not deltas
• Commits: blobs
• Branches: references to commits
• Repeat: branch = pointer
• Current branch: HEAD pointer
• Detached heads: careful
SVN branch & merge summary
• SVN has no branch concept. It's just another working
copy with a common history
• We can only merge two branches at a time
• SVN allow you to merge even not at all related trees
(error prone)
• Refactor and moving things around; svn doesn't manage
this kind of merges very well
• Only allows interaction one repository at a time.
Git branch & merge summary
• It’s trivial to create a new branch from any point.
• Git prevents us from deleting unmerged branches.
• We can clean up obsolete branches keeping commits.
• We can move a branch around (recreate it from any
starting point).
• We can merge more than one branch at a time (3 or even
more!!!).
• Git understands moved and renamed files.
• This model encourage best practices: branch-per-feature,
local branches for testing and experiments, git-flow …
Git allow us to manage branching well
Git integration with SVN
Interesting git resource
• http://git-scm.com
• http://git-scm.com/docs/gittutorial
• http://eagain.net/articles/git-for-computer-scientists/
• http://try.github.io/levels/1/challenges/1
• http://www.vogella.com/articles/Git/article.html
• https://help.github.com/articles/
• http://gitimmersion.com
Wich CVS should I choose and when?

More Related Content

What's hot

Using Subversion and Git Together
Using Subversion and Git TogetherUsing Subversion and Git Together
Using Subversion and Git Togethertmatesoftware
 
Getting started with git svn
Getting started with git svnGetting started with git svn
Getting started with git svnManij Shrestha
 
Source Code Management systems
Source Code Management systemsSource Code Management systems
Source Code Management systemsxSawyer
 
Collaborative development with Git | Workshop
Collaborative development with Git | WorkshopCollaborative development with Git | Workshop
Collaborative development with Git | WorkshopAnuchit Chalothorn
 
Subversion in a distributed world
Subversion in a distributed worldSubversion in a distributed world
Subversion in a distributed worldLorna Mitchell
 
Git introduction workshop for scientists
Git introduction workshop for scientists Git introduction workshop for scientists
Git introduction workshop for scientists Steven Hamblin
 
Version Control Systems with git (and github) as an example
Version Control Systems with git (and github) as an exampleVersion Control Systems with git (and github) as an example
Version Control Systems with git (and github) as an exampleGaurav Kumar Garg
 
Git presentation, Viktor Pyskunov
Git presentation, Viktor PyskunovGit presentation, Viktor Pyskunov
Git presentation, Viktor PyskunovViktor Pyskunov
 
Advanced Git Techniques: Subtrees, Grafting, and Other Fun Stuff
Advanced Git Techniques: Subtrees, Grafting, and Other Fun StuffAdvanced Git Techniques: Subtrees, Grafting, and Other Fun Stuff
Advanced Git Techniques: Subtrees, Grafting, and Other Fun StuffAtlassian
 
From Docker To Kubernetes: A Developer's Guide To Containers - Mandy White - ...
From Docker To Kubernetes: A Developer's Guide To Containers - Mandy White - ...From Docker To Kubernetes: A Developer's Guide To Containers - Mandy White - ...
From Docker To Kubernetes: A Developer's Guide To Containers - Mandy White - ...Codemotion
 

What's hot (20)

Git vs. Mercurial
Git vs. MercurialGit vs. Mercurial
Git vs. Mercurial
 
Using Subversion and Git Together
Using Subversion and Git TogetherUsing Subversion and Git Together
Using Subversion and Git Together
 
Getting started with git svn
Getting started with git svnGetting started with git svn
Getting started with git svn
 
Introduction to git
Introduction to gitIntroduction to git
Introduction to git
 
Source Code Management systems
Source Code Management systemsSource Code Management systems
Source Code Management systems
 
Collaborative development with Git | Workshop
Collaborative development with Git | WorkshopCollaborative development with Git | Workshop
Collaborative development with Git | Workshop
 
Git
GitGit
Git
 
Subversion in a distributed world
Subversion in a distributed worldSubversion in a distributed world
Subversion in a distributed world
 
Git introduction workshop for scientists
Git introduction workshop for scientists Git introduction workshop for scientists
Git introduction workshop for scientists
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
Version Control Systems with git (and github) as an example
Version Control Systems with git (and github) as an exampleVersion Control Systems with git (and github) as an example
Version Control Systems with git (and github) as an example
 
Git presentation, Viktor Pyskunov
Git presentation, Viktor PyskunovGit presentation, Viktor Pyskunov
Git presentation, Viktor Pyskunov
 
Advanced Git Techniques: Subtrees, Grafting, and Other Fun Stuff
Advanced Git Techniques: Subtrees, Grafting, and Other Fun StuffAdvanced Git Techniques: Subtrees, Grafting, and Other Fun Stuff
Advanced Git Techniques: Subtrees, Grafting, and Other Fun Stuff
 
Git in 5 Minutes
Git in 5 MinutesGit in 5 Minutes
Git in 5 Minutes
 
kubernetes for beginners
kubernetes for beginnerskubernetes for beginners
kubernetes for beginners
 
From Docker To Kubernetes: A Developer's Guide To Containers - Mandy White - ...
From Docker To Kubernetes: A Developer's Guide To Containers - Mandy White - ...From Docker To Kubernetes: A Developer's Guide To Containers - Mandy White - ...
From Docker To Kubernetes: A Developer's Guide To Containers - Mandy White - ...
 
Kubernetes Basics
Kubernetes BasicsKubernetes Basics
Kubernetes Basics
 
Effective Git
Effective GitEffective Git
Effective Git
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
Fabric8 CI/CD
Fabric8 CI/CDFabric8 CI/CD
Fabric8 CI/CD
 

Viewers also liked

Learning git
Learning gitLearning git
Learning gitSid Anand
 
Version control with GIT
Version control with GITVersion control with GIT
Version control with GITZeeshan Khan
 
JAZOON'13 - Bartosz Majsak - Git Workshop - Kung Fu
JAZOON'13 - Bartosz Majsak - Git Workshop - Kung FuJAZOON'13 - Bartosz Majsak - Git Workshop - Kung Fu
JAZOON'13 - Bartosz Majsak - Git Workshop - Kung Fujazoon13
 
A proven path for migrating from clearcase to git and or subversion
A proven path for migrating from clearcase to git and or subversionA proven path for migrating from clearcase to git and or subversion
A proven path for migrating from clearcase to git and or subversionCollabNet
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to GitLukas Fittl
 
Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners HubSpot
 
Git vs SVN
Git vs SVNGit vs SVN
Git vs SVNneuros
 
Quick Introduction to git
Quick Introduction to gitQuick Introduction to git
Quick Introduction to gitJoel Krebs
 

Viewers also liked (14)

Tech thursdays / GIT
Tech thursdays / GITTech thursdays / GIT
Tech thursdays / GIT
 
Learning git
Learning gitLearning git
Learning git
 
Version control with GIT
Version control with GITVersion control with GIT
Version control with GIT
 
JAZOON'13 - Bartosz Majsak - Git Workshop - Kung Fu
JAZOON'13 - Bartosz Majsak - Git Workshop - Kung FuJAZOON'13 - Bartosz Majsak - Git Workshop - Kung Fu
JAZOON'13 - Bartosz Majsak - Git Workshop - Kung Fu
 
A proven path for migrating from clearcase to git and or subversion
A proven path for migrating from clearcase to git and or subversionA proven path for migrating from clearcase to git and or subversion
A proven path for migrating from clearcase to git and or subversion
 
Git
GitGit
Git
 
Git Introduction
Git IntroductionGit Introduction
Git Introduction
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Intro To Git
Intro To GitIntro To Git
Intro To Git
 
Git Presentation
Git PresentationGit Presentation
Git Presentation
 
Getting Git
Getting GitGetting Git
Getting Git
 
Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners
 
Git vs SVN
Git vs SVNGit vs SVN
Git vs SVN
 
Quick Introduction to git
Quick Introduction to gitQuick Introduction to git
Quick Introduction to git
 

Similar to Git vs Subversion: ¿Cuando elegir uno u otro?

Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)Ahmed El-Arabawy
 
SVN Tool Information : Best Practices
SVN Tool Information  : Best PracticesSVN Tool Information  : Best Practices
SVN Tool Information : Best PracticesMaidul Islam
 
Source version control using subversion
Source version control using subversionSource version control using subversion
Source version control using subversionMangesh Bhujbal
 
Git and GitHub
Git and GitHubGit and GitHub
Git and GitHub태환 김
 
Source control - what you need to know
Source control - what you need to knowSource control - what you need to know
Source control - what you need to knowdaveymni
 
An introduction to Git and GitFlow
An introduction to Git and GitFlowAn introduction to Git and GitFlow
An introduction to Git and GitFlowMark Everard
 
Beginner's Guide to Version Control with Git
Beginner's Guide to Version Control with GitBeginner's Guide to Version Control with Git
Beginner's Guide to Version Control with GitRobert Lee-Cann
 
Make It Cooler: Using Decentralized Version Control
Make It Cooler: Using Decentralized Version ControlMake It Cooler: Using Decentralized Version Control
Make It Cooler: Using Decentralized Version Controlindiver
 
Version Control Systems -- Git -- Part I
Version Control Systems -- Git -- Part IVersion Control Systems -- Git -- Part I
Version Control Systems -- Git -- Part ISergey Aganezov
 
Git essential training & sharing self
Git essential training & sharing selfGit essential training & sharing self
Git essential training & sharing selfChen-Tien Tsai
 

Similar to Git vs Subversion: ¿Cuando elegir uno u otro? (20)

Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
 
SVN Tool Information : Best Practices
SVN Tool Information  : Best PracticesSVN Tool Information  : Best Practices
SVN Tool Information : Best Practices
 
SVN Information
SVN Information  SVN Information
SVN Information
 
Source version control using subversion
Source version control using subversionSource version control using subversion
Source version control using subversion
 
GIT In Detail
GIT In DetailGIT In Detail
GIT In Detail
 
Git and GitHub
Git and GitHubGit and GitHub
Git and GitHub
 
GIT INTRODUCTION
GIT INTRODUCTIONGIT INTRODUCTION
GIT INTRODUCTION
 
Git
GitGit
Git
 
Source control - what you need to know
Source control - what you need to knowSource control - what you need to know
Source control - what you need to know
 
Working with Git
Working with GitWorking with Git
Working with Git
 
An introduction to Git and GitFlow
An introduction to Git and GitFlowAn introduction to Git and GitFlow
An introduction to Git and GitFlow
 
Git
GitGit
Git
 
Git more done
Git more doneGit more done
Git more done
 
Beginner's Guide to Version Control with Git
Beginner's Guide to Version Control with GitBeginner's Guide to Version Control with Git
Beginner's Guide to Version Control with Git
 
Make It Cooler: Using Decentralized Version Control
Make It Cooler: Using Decentralized Version ControlMake It Cooler: Using Decentralized Version Control
Make It Cooler: Using Decentralized Version Control
 
Introduction to git
Introduction to gitIntroduction to git
Introduction to git
 
Gitlikeapro 2019
Gitlikeapro 2019Gitlikeapro 2019
Gitlikeapro 2019
 
Version Control Systems -- Git -- Part I
Version Control Systems -- Git -- Part IVersion Control Systems -- Git -- Part I
Version Control Systems -- Git -- Part I
 
Git essential training & sharing self
Git essential training & sharing selfGit essential training & sharing self
Git essential training & sharing self
 
Introduction to git
Introduction to gitIntroduction to git
Introduction to git
 

More from Paradigma Digital

Bots 3.0: Dejando atrás los bots conversacionales con Dialogflow.
Bots 3.0: Dejando atrás los bots conversacionales con Dialogflow.Bots 3.0: Dejando atrás los bots conversacionales con Dialogflow.
Bots 3.0: Dejando atrás los bots conversacionales con Dialogflow.Paradigma Digital
 
Java 8 time to join the future
Java 8  time to join the futureJava 8  time to join the future
Java 8 time to join the futureParadigma Digital
 
Programación Reactiva con Spring WebFlux
Programación Reactiva con Spring WebFluxProgramación Reactiva con Spring WebFlux
Programación Reactiva con Spring WebFluxParadigma Digital
 
Orquestando microservicios como lo hace Netflix
Orquestando microservicios como lo hace NetflixOrquestando microservicios como lo hace Netflix
Orquestando microservicios como lo hace NetflixParadigma Digital
 
Meetup microservicios: API Management
Meetup microservicios: API ManagementMeetup microservicios: API Management
Meetup microservicios: API ManagementParadigma Digital
 
Meetup de kubernetes, conceptos básicos.
Meetup  de kubernetes, conceptos básicos.Meetup  de kubernetes, conceptos básicos.
Meetup de kubernetes, conceptos básicos.Paradigma Digital
 
Docker, kubernetes, openshift y openstack, para mi abuela. techfest 2017.pptx
Docker, kubernetes, openshift y openstack, para mi abuela. techfest 2017.pptxDocker, kubernetes, openshift y openstack, para mi abuela. techfest 2017.pptx
Docker, kubernetes, openshift y openstack, para mi abuela. techfest 2017.pptxParadigma Digital
 
Implementando microservicios
Implementando microserviciosImplementando microservicios
Implementando microserviciosParadigma Digital
 
Equipo de Marketing de Paradigma Digital
Equipo de Marketing de Paradigma DigitalEquipo de Marketing de Paradigma Digital
Equipo de Marketing de Paradigma DigitalParadigma Digital
 
¿Cómo se despliega y autoescala Couchbase en Cloud? ¡Aprende de manera práctica!
¿Cómo se despliega y autoescala Couchbase en Cloud? ¡Aprende de manera práctica!¿Cómo se despliega y autoescala Couchbase en Cloud? ¡Aprende de manera práctica!
¿Cómo se despliega y autoescala Couchbase en Cloud? ¡Aprende de manera práctica!Paradigma Digital
 
Manuel Hurtado. Couchbase paradigma4oct
Manuel Hurtado. Couchbase paradigma4octManuel Hurtado. Couchbase paradigma4oct
Manuel Hurtado. Couchbase paradigma4octParadigma Digital
 
Programación Reactiva con RxJava
Programación Reactiva con RxJavaProgramación Reactiva con RxJava
Programación Reactiva con RxJavaParadigma Digital
 
¿Cómo vencer a los dragones digitales?
¿Cómo vencer a los dragones digitales?¿Cómo vencer a los dragones digitales?
¿Cómo vencer a los dragones digitales?Paradigma Digital
 

More from Paradigma Digital (20)

Ddd + ah + microservicios
Ddd + ah + microserviciosDdd + ah + microservicios
Ddd + ah + microservicios
 
Bots 3.0: Dejando atrás los bots conversacionales con Dialogflow.
Bots 3.0: Dejando atrás los bots conversacionales con Dialogflow.Bots 3.0: Dejando atrás los bots conversacionales con Dialogflow.
Bots 3.0: Dejando atrás los bots conversacionales con Dialogflow.
 
Have you met Istio?
Have you met Istio?Have you met Istio?
Have you met Istio?
 
Linkerd a fondo
Linkerd a fondoLinkerd a fondo
Linkerd a fondo
 
Horneando apis
Horneando apisHorneando apis
Horneando apis
 
Java 8 time to join the future
Java 8  time to join the futureJava 8  time to join the future
Java 8 time to join the future
 
Programación Reactiva con Spring WebFlux
Programación Reactiva con Spring WebFluxProgramación Reactiva con Spring WebFlux
Programación Reactiva con Spring WebFlux
 
Orquestando microservicios como lo hace Netflix
Orquestando microservicios como lo hace NetflixOrquestando microservicios como lo hace Netflix
Orquestando microservicios como lo hace Netflix
 
Meetup microservicios: API Management
Meetup microservicios: API ManagementMeetup microservicios: API Management
Meetup microservicios: API Management
 
Meetup de kubernetes, conceptos básicos.
Meetup  de kubernetes, conceptos básicos.Meetup  de kubernetes, conceptos básicos.
Meetup de kubernetes, conceptos básicos.
 
Docker, kubernetes, openshift y openstack, para mi abuela. techfest 2017.pptx
Docker, kubernetes, openshift y openstack, para mi abuela. techfest 2017.pptxDocker, kubernetes, openshift y openstack, para mi abuela. techfest 2017.pptx
Docker, kubernetes, openshift y openstack, para mi abuela. techfest 2017.pptx
 
Implementando microservicios
Implementando microserviciosImplementando microservicios
Implementando microservicios
 
Equipo de Marketing de Paradigma Digital
Equipo de Marketing de Paradigma DigitalEquipo de Marketing de Paradigma Digital
Equipo de Marketing de Paradigma Digital
 
¿Cómo se despliega y autoescala Couchbase en Cloud? ¡Aprende de manera práctica!
¿Cómo se despliega y autoescala Couchbase en Cloud? ¡Aprende de manera práctica!¿Cómo se despliega y autoescala Couchbase en Cloud? ¡Aprende de manera práctica!
¿Cómo se despliega y autoescala Couchbase en Cloud? ¡Aprende de manera práctica!
 
Overview atlas (1)
Overview atlas (1)Overview atlas (1)
Overview atlas (1)
 
Cómo usar google analytics
Cómo usar google analyticsCómo usar google analytics
Cómo usar google analytics
 
Transformación Digital
Transformación DigitalTransformación Digital
Transformación Digital
 
Manuel Hurtado. Couchbase paradigma4oct
Manuel Hurtado. Couchbase paradigma4octManuel Hurtado. Couchbase paradigma4oct
Manuel Hurtado. Couchbase paradigma4oct
 
Programación Reactiva con RxJava
Programación Reactiva con RxJavaProgramación Reactiva con RxJava
Programación Reactiva con RxJava
 
¿Cómo vencer a los dragones digitales?
¿Cómo vencer a los dragones digitales?¿Cómo vencer a los dragones digitales?
¿Cómo vencer a los dragones digitales?
 

Recently uploaded

Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 

Recently uploaded (20)

Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 

Git vs Subversion: ¿Cuando elegir uno u otro?

  • 1. GIT VS. SVN Which one should we use and when? http://www.paradigmatecnologico.com @paradigmate http://marianonavas.me @marianongdev
  • 2. What is a CVS for? • Allow team work together and collaborate • Have some kind of time machine in our code • Allow CI
  • 3. Approaches (architectural models) • Local • Rcs (Mac OS Developer Tools) • Centralized • Subversion • CVS • Perforce • Distributed • Git • Mercurial
  • 4. Approaches (architectural models) • Local • Rcs (Mac OS Developer Tools) • Centralized • Subversion • CVS • Perforce • Distributed • Git • Mercurial
  • 8. Centralized • Pros • Looks simple • We know it well; we've been using it for a long time • Good mainstream IDEs integration • It works  • Cons • We cannot commit offline (well, we can, but …) • We cannot integrate in our development toolset more than one repository • Dificult to collaborate if team is large (i.e. open source projects) • We are encouraged to avoid branches by the system.
  • 9. Distributed • Pros • Allow offline work • Easy collaboration model • Can link as many repositories as we might need • Almost every operation is local • Complete copy of the repository in each machine • Easy installation on server, and plenty of hosting services (free and paid) • Cons • More complex workflow (or not?) • Difficult to learn • ?????
  • 12. Branching in SVN Quotes taken from official svn website • "For projects that have a large number of contributors, it's common for most people to have working copies of the trunk. Whenever someone needs to make a long-running change that is likely to disrupt the trunk, a standard procedure is to create a private branch and commit changes there until all the work is complete" • "The bad news is that it's very easy to drift too far apart (...) it may be near-impossible to merge your changes back into the trunk without a huge number of conflicts" • "Subversion gives you the ability to selectively “copy” changes between branches. And when you're completely finished with your branch, your entire set of branch changes can be copied back into the trunk. In Subversion terminology, the general act of replicating changes from one branch to another is called merging, and it is performed using various invocations of the svn merge subcommand”
  • 13. Branching in SVN I (typical workflow) • Checkout from trunk. • Add a new file to working copy • Check status (svn st). • Track new file in svn (svn add). • Commit the new file (svn ci). • Modify the file, and check status again (svn st). • Commit the new change. • Modify again and let it remain modified.
  • 14. Branching in SVN II (branch & merge) • Svn copy at server level. • Check current working copy remote path (svn info). • Switch to new location (svn switch [remote] .) • Check remote again (svn info). • Commit some change to the branch. • Switch again to trunk. • Merge trunk with [myNewBranch] (svn merge [source@rev] .). Note that we do it with the working copy first to merge conflicts locally. • Commit to finish merge (we’ve done it locally in the previous step). • Again with a non-conflicting change in the same file. • Again with a conflicting change.
  • 15. Internal representation of data; svn • Repository: the main idea • Working copy • Revisions, which are deltas of a base state • The server has to workout deltas to resolve the concrete state of a revision (commit) • Each revision gets a unique (secuential) id. This is possible because it's centralized • Branches: are light copies of complete working trees • Summary: branch=copy.
  • 16. Drawbacks I: only one remote
  • 17. Drawbacks II: branch & merge sucks • Recall branch & merge procedure: • Copy trunk in branch directory in remote server • Checkout (or switch) locally. • Inspect revision we want to merge with, if not last. • Call svn merge. • Resolve conflicts (if any). • Commit the whole thing. • In practice we feel encouraged to not create branches (bad, bad, bad …).
  • 18. Drawback III: cleanliness • What if I want to merge my branch just to get up to date with our trunk, but I don’t want to make it public yet (incomplete feature or just playing around)?
  • 19. Drawback IV: privacy • Do I have to publish my code to a remote/public server to have version control? What if I’m doing some experiments I don’t want other people to see, or I just don’t want to mess up our central repository with something I don’t know if it’s going to work?
  • 21. Git – file status lifecycle
  • 22. Git internal storage structure: directed acyclic graph (DAG) • http://eagain.net/articles/git-for-computer-scientists/
  • 24. Deeper insight in git DAG internal structure
  • 25. Another view of git objects I
  • 26. Another view of git objects II
  • 27. Another view of git objects III
  • 28. Details on how git stores that in disk • http://git-scm.com/book/en/Git-Internals-Git-Objects
  • 30. More on git internal representation of data • http://eagain.net/articles/git-for-computer-scientists/ • http://en.wikipedia.org/wiki/Directed_acyclic_graph • Due to its distributed nature unique ids for commits are generated as SHA-1 digest to ensure unicity • Explanation • Snapshots, not deltas • Commits: blobs • Branches: references to commits • Repeat: branch = pointer • Current branch: HEAD pointer • Detached heads: careful
  • 31. SVN branch & merge summary • SVN has no branch concept. It's just another working copy with a common history • We can only merge two branches at a time • SVN allow you to merge even not at all related trees (error prone) • Refactor and moving things around; svn doesn't manage this kind of merges very well • Only allows interaction one repository at a time.
  • 32. Git branch & merge summary • It’s trivial to create a new branch from any point. • Git prevents us from deleting unmerged branches. • We can clean up obsolete branches keeping commits. • We can move a branch around (recreate it from any starting point). • We can merge more than one branch at a time (3 or even more!!!). • Git understands moved and renamed files. • This model encourage best practices: branch-per-feature, local branches for testing and experiments, git-flow …
  • 33. Git allow us to manage branching well
  • 35. Interesting git resource • http://git-scm.com • http://git-scm.com/docs/gittutorial • http://eagain.net/articles/git-for-computer-scientists/ • http://try.github.io/levels/1/challenges/1 • http://www.vogella.com/articles/Git/article.html • https://help.github.com/articles/ • http://gitimmersion.com
  • 36. Wich CVS should I choose and when?