SlideShare une entreprise Scribd logo
1  sur  24
1




   Git from a different (CVS/SVN) perspective

                   Christian Campo
                   EclipseCon Europe 2011




                     Confidential | Date | Other Information, if necessary
November 7, 2011                                                                                        © 2002 IBM Corporation
                                             Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0
Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0   2
Git vs CVS vs SVN

   Git
   •    commits like db transactions
   •    commits linked in a hierarchy
   •    commits contains for a collection of files
   •    decentral repo
                                                                                CVS
                                                                                •      commits are unrelated file diffs
                                                                                •      central repo

                                              SVN
                                              •    commits are file diffs
                                              •    commit file diffs can be linked with a common revision
                                              •    central repo




Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0                                      3
Git Promises/Claims

          you get your own local repository
          you can commit even offline (in an airplane)
          branching is easy and no longer an unusual task but part of your
           everyday workflow and its so much easier with Git
          you hated merging with CVS (SVN) ? you are going to love it with Git
          Git is fast and easy
          you cant run an open source project without Git




Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0   4
Git promises from the CVS angle

          you never wanted a local repository
          you hate toonly checkout a wholecommit in an airplane (modules)
            • you can fly and therefore never repo with all projects
            • you Internet now officially of the last 1-5
          you hate branches andhistory everywhere ? years
            • isnt get the whole actually never create them yourself
            • and even if you are offline, just write code for a change
            • and all branches
            • your release engineer does that
          you have a different definition of merge, if two people modify
            • so now you should MERGE.
           unrelated files thats NOcreate branches ? NO way
            • branches isnt that like a fork ?
          Git is fast ! but not easy
          successful open source only requires Git....seriously ?
              •   no javadoc
              •   no unit tests
              •   no clean code
              •   no integration tests
              •   JUST Git ??


Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0   5
Git is giving words/things a new meaning

          commit does not mean everybody can see your code
          merge happens even if you edit unrelated files
          first commit THAN merge THAN possibly commit again ??
                  and then....the merge commit is empty ? (has no diff)
          repository is not one central thing on the server but everyone has one
          branches on client and server can have different names
                  its ok if two repos dont carry the same branches/tags




Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0   6
CVS Users Migration Steps



                                            Step 1: Resistance




Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0   7
CVS has a real Synchronize

          Synchronize shows me the list of incoming and outgoing changes on
           file level
          helps to not check in stuff that I dont intent to
          often people check incoming changes on a detailed level
                  helps to understand what other people changed
                  refactor stuff that seems wrong
                  check typos :-)
                  improves the quality of the code
                  update is done step by step like kind of a to-do-list
          there is Synchronize in Git, but you can not incrementally update
           (because of the concept of Git)



Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0   8
Things only CVS can do

          you can tag projects independant as you go
          you can tag single files later
          selectivly update only some projects
          NOT resolve conflicts when you update (i.e. a xx.launch file that you
           changed)




Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0   9
CVS Usage is NOT problem free

          If you branch you almost never merge (because its so hard)
          it was always complicated to figure out what was changed for a certain
           changeset ?
          A "changeset" are merely commits with the same message so it is easy
           to amend a commit :-)
          did you ever tag before and after a commit to log the difference ?
                  if you develop in HEAD and a version branch und later you have to copy
                   changesets from HEAD to the version branch




Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0        10
More CVS crap

          Refactoring (renaming a class) means loosing all your history
          Renaming a package, project means loosing all history of all objects in
           that package/project
          If you delete a project it does not get deleted at your collegues
           workspace committer unless you TELL him. (and he deletes it
           manually)
          If you add a project your collegues wont find out until you TELL them.




Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0   11
And you come to Git...

          And people tell you....
           the easiest way to use Git is the command line
          however the command line is way better than you expect
          it was created to actually work with it on a daily base




Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0   12
CVS User Migration Steps



                                            Step 2: Euphoria

                                        „Git is CVS without its problems, I have“




Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0   13
Pitfalls in Git


       you try to pull before you committed your changes
       you push .... EVERYTHING (including all local branches)
       you create a new project in the root of the Git Repository directory




Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0   14
Pitfalls in Git II

          Merge conflicts are a little more complicated
                  CVS flags the conflict
                  Git Pull actually puts a comment in the file (so that it doesnt compile)
          Rebases can be scary (rerunning commits on a different branch and
           hoping that the commits also work there)
                  Merge conflicts in the middle of a rebase even more
          You always have to update everything (no way to exclude a bundle or a
           file)




Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0          15
More stuff...

          CVS users moving to Git think that Git is the solution to everything they
           missed in CVS
                  yes moving content between files means that Git still can keep track of
                   the history
                  try to rename a bundle (just for fun) and then look at the proposed
                   commit (there is “git mv” though)
          you hear that the Git repo of the Eclipse platform was corrupted by a
           single committer (Is Git the right move for me ?)




Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0         18
CVS User Migration Steps



                                            Step 3: Realtity

                                        Understanding what you can do




Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0   19
Where Git is better than CVS (the centerpiece)

          commits
                  changes collected together in one metaobject called commit
                  put more effort in creating a good commit
                  amend a commit if wrong, dont just add a second (like in CVS)
                  make smaller commits
                  commits should be a "unit-of-work" useful by itself
          a good history is the key to using Git
          only Git commits truely show which modifications where committed
           together
          there is no commit in CVS !!! Its just writing a collection of diffs..




Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0   20
Things only Git can do

          Pick some commits from one branch into another (cherrypicking)
          Revert commits
          Merge branches (and that actually works :-) )
          Rebase your local changes on top of the server master
          Work on commits in the past
                  Tag them
                  Branch from them
                  Sign them
                  Reset your workspace to that time in history
          If you manually undo the changes in a file it automagically shows the
           file as unmodified.


Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0   21
Things only Git can do

          develop multiple features in parallel without checking-into-the-server-
           repo
          stash your current work, while you do something else and then come
           back to your work in progress
          commit only parts of the changes in a file
          freeze a state of your files before they are committed (staging area)




Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0   22
Git is confusing at times

          It uses names that CVS uses, but means something different
                  commit, merge, repo
          local tracking branches can have a strategy
          git history can be confusing and complicated




Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0   23
Summary

          Dont treat Git as if it were CVS.
          Getting from CVS to Git
                  requires you to "re-wire" your brain
                  get used to a new way of doing things
                  adapt your way of doing things to retain your workflow as much as
                   possible
          Symptoms are similar to learning any kind of new technology
                  remember XML, Javascript, Objective-C, Modeling, XText, Tycho
          Git opens the door for better collaboration and contribution from
           others




Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0   25
And...one more thing....


                     ...you can commit in an airplane




Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0   26
Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0   27

Contenu connexe

Tendances

August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchHoward Greenberg
 
JavaOne 2016: Kubernetes introduction for Java Developers
JavaOne 2016: Kubernetes introduction for Java Developers JavaOne 2016: Kubernetes introduction for Java Developers
JavaOne 2016: Kubernetes introduction for Java Developers Rafael Benevides
 
Testing with Docker
Testing with DockerTesting with Docker
Testing with Dockertoffermann
 
Building Jenkins Pipelines at Scale
Building Jenkins Pipelines at ScaleBuilding Jenkins Pipelines at Scale
Building Jenkins Pipelines at ScaleJulien Pivotto
 
Git for IBM Notes Designer
Git for IBM Notes DesignerGit for IBM Notes Designer
Git for IBM Notes DesignerSlobodan Lohja
 
Large Scale Development with Git and Gerrit - EclipseCon Europe 2012
Large Scale Development with Git and Gerrit - EclipseCon Europe 2012Large Scale Development with Git and Gerrit - EclipseCon Europe 2012
Large Scale Development with Git and Gerrit - EclipseCon Europe 2012msohn
 
Voxxed Luxembourd 2016 Jenkins 2.0 et Pipeline as code
Voxxed Luxembourd 2016 Jenkins 2.0 et Pipeline as codeVoxxed Luxembourd 2016 Jenkins 2.0 et Pipeline as code
Voxxed Luxembourd 2016 Jenkins 2.0 et Pipeline as codeDamien Duportal
 
JavaOne 2016: The Deploy Master: From Basic to Zero Downtime, Blue/Green, A/B...
JavaOne 2016: The Deploy Master: From Basic to Zero Downtime, Blue/Green, A/B...JavaOne 2016: The Deploy Master: From Basic to Zero Downtime, Blue/Green, A/B...
JavaOne 2016: The Deploy Master: From Basic to Zero Downtime, Blue/Green, A/B...Rafael Benevides
 
Delivery Pipeline as Code: using Jenkins 2.0 Pipeline
Delivery Pipeline as Code: using Jenkins 2.0 PipelineDelivery Pipeline as Code: using Jenkins 2.0 Pipeline
Delivery Pipeline as Code: using Jenkins 2.0 PipelineSlawa Giterman
 
Devops interview questions 2 www.bigclasses.com
Devops interview questions  2  www.bigclasses.comDevops interview questions  2  www.bigclasses.com
Devops interview questions 2 www.bigclasses.combigclasses.com
 
Cloud Native CI/CD with Jenkins X and Knative Pipelines
Cloud Native CI/CD with Jenkins X and Knative PipelinesCloud Native CI/CD with Jenkins X and Knative Pipelines
Cloud Native CI/CD with Jenkins X and Knative PipelinesC4Media
 
p2, your savior or your achilles heel? Everything an Eclipse team needs to kn...
p2, your savior or your achilles heel? Everything an Eclipse team needs to kn...p2, your savior or your achilles heel? Everything an Eclipse team needs to kn...
p2, your savior or your achilles heel? Everything an Eclipse team needs to kn...irbull
 
PuppetConf 2016: Implementing Puppet within a Complex Enterprise – Jerry Caup...
PuppetConf 2016: Implementing Puppet within a Complex Enterprise – Jerry Caup...PuppetConf 2016: Implementing Puppet within a Complex Enterprise – Jerry Caup...
PuppetConf 2016: Implementing Puppet within a Complex Enterprise – Jerry Caup...Puppet
 
February OpenNTF Webinar: Introduction to Ansible for Newbies
February OpenNTF Webinar: Introduction to Ansible for NewbiesFebruary OpenNTF Webinar: Introduction to Ansible for Newbies
February OpenNTF Webinar: Introduction to Ansible for NewbiesHoward Greenberg
 
Version Control With Subversion
Version Control With SubversionVersion Control With Subversion
Version Control With SubversionSamnang Chhun
 
Software development made serious
Software development made seriousSoftware development made serious
Software development made seriousDanilo Pianini
 

Tendances (20)

August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
 
JavaOne 2016: Kubernetes introduction for Java Developers
JavaOne 2016: Kubernetes introduction for Java Developers JavaOne 2016: Kubernetes introduction for Java Developers
JavaOne 2016: Kubernetes introduction for Java Developers
 
Testing with Docker
Testing with DockerTesting with Docker
Testing with Docker
 
Building Jenkins Pipelines at Scale
Building Jenkins Pipelines at ScaleBuilding Jenkins Pipelines at Scale
Building Jenkins Pipelines at Scale
 
Git for IBM Notes Designer
Git for IBM Notes DesignerGit for IBM Notes Designer
Git for IBM Notes Designer
 
Large Scale Development with Git and Gerrit - EclipseCon Europe 2012
Large Scale Development with Git and Gerrit - EclipseCon Europe 2012Large Scale Development with Git and Gerrit - EclipseCon Europe 2012
Large Scale Development with Git and Gerrit - EclipseCon Europe 2012
 
Voxxed Luxembourd 2016 Jenkins 2.0 et Pipeline as code
Voxxed Luxembourd 2016 Jenkins 2.0 et Pipeline as codeVoxxed Luxembourd 2016 Jenkins 2.0 et Pipeline as code
Voxxed Luxembourd 2016 Jenkins 2.0 et Pipeline as code
 
JavaOne 2016: The Deploy Master: From Basic to Zero Downtime, Blue/Green, A/B...
JavaOne 2016: The Deploy Master: From Basic to Zero Downtime, Blue/Green, A/B...JavaOne 2016: The Deploy Master: From Basic to Zero Downtime, Blue/Green, A/B...
JavaOne 2016: The Deploy Master: From Basic to Zero Downtime, Blue/Green, A/B...
 
Delivery Pipeline as Code: using Jenkins 2.0 Pipeline
Delivery Pipeline as Code: using Jenkins 2.0 PipelineDelivery Pipeline as Code: using Jenkins 2.0 Pipeline
Delivery Pipeline as Code: using Jenkins 2.0 Pipeline
 
Devops interview questions 2 www.bigclasses.com
Devops interview questions  2  www.bigclasses.comDevops interview questions  2  www.bigclasses.com
Devops interview questions 2 www.bigclasses.com
 
Evolution ofversioncontrolinopensource
Evolution ofversioncontrolinopensourceEvolution ofversioncontrolinopensource
Evolution ofversioncontrolinopensource
 
SVN Basics
SVN BasicsSVN Basics
SVN Basics
 
Cloud Native CI/CD with Jenkins X and Knative Pipelines
Cloud Native CI/CD with Jenkins X and Knative PipelinesCloud Native CI/CD with Jenkins X and Knative Pipelines
Cloud Native CI/CD with Jenkins X and Knative Pipelines
 
p2, your savior or your achilles heel? Everything an Eclipse team needs to kn...
p2, your savior or your achilles heel? Everything an Eclipse team needs to kn...p2, your savior or your achilles heel? Everything an Eclipse team needs to kn...
p2, your savior or your achilles heel? Everything an Eclipse team needs to kn...
 
Webinar : SVN to GIT Migration
Webinar : SVN to GIT Migration Webinar : SVN to GIT Migration
Webinar : SVN to GIT Migration
 
GIT In Detail
GIT In DetailGIT In Detail
GIT In Detail
 
PuppetConf 2016: Implementing Puppet within a Complex Enterprise – Jerry Caup...
PuppetConf 2016: Implementing Puppet within a Complex Enterprise – Jerry Caup...PuppetConf 2016: Implementing Puppet within a Complex Enterprise – Jerry Caup...
PuppetConf 2016: Implementing Puppet within a Complex Enterprise – Jerry Caup...
 
February OpenNTF Webinar: Introduction to Ansible for Newbies
February OpenNTF Webinar: Introduction to Ansible for NewbiesFebruary OpenNTF Webinar: Introduction to Ansible for Newbies
February OpenNTF Webinar: Introduction to Ansible for Newbies
 
Version Control With Subversion
Version Control With SubversionVersion Control With Subversion
Version Control With Subversion
 
Software development made serious
Software development made seriousSoftware development made serious
Software development made serious
 

Similaire à Git vs cvs ece2011

A Tutorial for GitHub.pdf
A Tutorial for GitHub.pdfA Tutorial for GitHub.pdf
A Tutorial for GitHub.pdfAmarnadh36
 
A Tutorial for GitHub.pdf
A Tutorial for GitHub.pdfA Tutorial for GitHub.pdf
A Tutorial for GitHub.pdfbadrfathallah2
 
EclipseCon 2010 tutorial: Understanding git at Eclipse
EclipseCon 2010 tutorial: Understanding git at EclipseEclipseCon 2010 tutorial: Understanding git at Eclipse
EclipseCon 2010 tutorial: Understanding git at Eclipsemsohn
 
Nina Zakharenko - Introduction to Git - Start SLC 2015
Nina Zakharenko - Introduction to Git - Start SLC 2015Nina Zakharenko - Introduction to Git - Start SLC 2015
Nina Zakharenko - Introduction to Git - Start SLC 2015Nina Zakharenko
 
02-version control(DevOps Series)
02-version control(DevOps Series)02-version control(DevOps Series)
02-version control(DevOps Series)Mohammed Shaban
 
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...Simplilearn
 
Git vs Subversion: ¿Cuando elegir uno u otro?
Git vs Subversion: ¿Cuando elegir uno u otro?Git vs Subversion: ¿Cuando elegir uno u otro?
Git vs Subversion: ¿Cuando elegir uno u otro?Paradigma Digital
 
How to use CVS applied to SOLab
How to use CVS applied to SOLabHow to use CVS applied to SOLab
How to use CVS applied to SOLabPablo Arriazu
 
BLUG 2012 Version Control for Notes Developers
BLUG 2012 Version Control for Notes DevelopersBLUG 2012 Version Control for Notes Developers
BLUG 2012 Version Control for Notes DevelopersMartin Jinoch
 
Evolution of Version Control In Open Source
Evolution of Version Control In Open SourceEvolution of Version Control In Open Source
Evolution of Version Control In Open SourceChris Aniszczyk
 
Code Review with Git and Gerrit - Devoxx 2011 - Tools in Action - 2011-11-14
Code Review with Git and Gerrit - Devoxx 2011 - Tools in Action - 2011-11-14Code Review with Git and Gerrit - Devoxx 2011 - Tools in Action - 2011-11-14
Code Review with Git and Gerrit - Devoxx 2011 - Tools in Action - 2011-11-14msohn
 

Similaire à Git vs cvs ece2011 (20)

Git
GitGit
Git
 
GIT_Overview.
GIT_Overview.GIT_Overview.
GIT_Overview.
 
Git
GitGit
Git
 
A Tutorial for GitHub.pdf
A Tutorial for GitHub.pdfA Tutorial for GitHub.pdf
A Tutorial for GitHub.pdf
 
A Tutorial for GitHub.pdf
A Tutorial for GitHub.pdfA Tutorial for GitHub.pdf
A Tutorial for GitHub.pdf
 
Subversion
SubversionSubversion
Subversion
 
git.ppt
git.pptgit.ppt
git.ppt
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Git hub_pptx
Git hub_pptxGit hub_pptx
Git hub_pptx
 
EclipseCon 2010 tutorial: Understanding git at Eclipse
EclipseCon 2010 tutorial: Understanding git at EclipseEclipseCon 2010 tutorial: Understanding git at Eclipse
EclipseCon 2010 tutorial: Understanding git at Eclipse
 
Mini-training: Let’s Git It!
Mini-training: Let’s Git It!Mini-training: Let’s Git It!
Mini-training: Let’s Git It!
 
Nina Zakharenko - Introduction to Git - Start SLC 2015
Nina Zakharenko - Introduction to Git - Start SLC 2015Nina Zakharenko - Introduction to Git - Start SLC 2015
Nina Zakharenko - Introduction to Git - Start SLC 2015
 
02-version control(DevOps Series)
02-version control(DevOps Series)02-version control(DevOps Series)
02-version control(DevOps Series)
 
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
 
Git vs Subversion: ¿Cuando elegir uno u otro?
Git vs Subversion: ¿Cuando elegir uno u otro?Git vs Subversion: ¿Cuando elegir uno u otro?
Git vs Subversion: ¿Cuando elegir uno u otro?
 
How to use CVS applied to SOLab
How to use CVS applied to SOLabHow to use CVS applied to SOLab
How to use CVS applied to SOLab
 
BLUG 2012 Version Control for Notes Developers
BLUG 2012 Version Control for Notes DevelopersBLUG 2012 Version Control for Notes Developers
BLUG 2012 Version Control for Notes Developers
 
Evolution of Version Control In Open Source
Evolution of Version Control In Open SourceEvolution of Version Control In Open Source
Evolution of Version Control In Open Source
 
Code Review with Git and Gerrit - Devoxx 2011 - Tools in Action - 2011-11-14
Code Review with Git and Gerrit - Devoxx 2011 - Tools in Action - 2011-11-14Code Review with Git and Gerrit - Devoxx 2011 - Tools in Action - 2011-11-14
Code Review with Git and Gerrit - Devoxx 2011 - Tools in Action - 2011-11-14
 
Git training (basic)
Git training (basic)Git training (basic)
Git training (basic)
 

Dernier

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 

Dernier (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 

Git vs cvs ece2011

  • 1. 1 Git from a different (CVS/SVN) perspective Christian Campo EclipseCon Europe 2011 Confidential | Date | Other Information, if necessary November 7, 2011 © 2002 IBM Corporation Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0
  • 2. Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 2
  • 3. Git vs CVS vs SVN Git • commits like db transactions • commits linked in a hierarchy • commits contains for a collection of files • decentral repo CVS • commits are unrelated file diffs • central repo SVN • commits are file diffs • commit file diffs can be linked with a common revision • central repo Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 3
  • 4. Git Promises/Claims  you get your own local repository  you can commit even offline (in an airplane)  branching is easy and no longer an unusual task but part of your everyday workflow and its so much easier with Git  you hated merging with CVS (SVN) ? you are going to love it with Git  Git is fast and easy  you cant run an open source project without Git Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 4
  • 5. Git promises from the CVS angle  you never wanted a local repository  you hate toonly checkout a wholecommit in an airplane (modules) • you can fly and therefore never repo with all projects • you Internet now officially of the last 1-5  you hate branches andhistory everywhere ? years • isnt get the whole actually never create them yourself • and even if you are offline, just write code for a change • and all branches • your release engineer does that  you have a different definition of merge, if two people modify • so now you should MERGE. unrelated files thats NOcreate branches ? NO way • branches isnt that like a fork ?  Git is fast ! but not easy  successful open source only requires Git....seriously ? • no javadoc • no unit tests • no clean code • no integration tests • JUST Git ?? Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 5
  • 6. Git is giving words/things a new meaning  commit does not mean everybody can see your code  merge happens even if you edit unrelated files  first commit THAN merge THAN possibly commit again ??  and then....the merge commit is empty ? (has no diff)  repository is not one central thing on the server but everyone has one  branches on client and server can have different names  its ok if two repos dont carry the same branches/tags Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 6
  • 7. CVS Users Migration Steps Step 1: Resistance Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 7
  • 8. CVS has a real Synchronize  Synchronize shows me the list of incoming and outgoing changes on file level  helps to not check in stuff that I dont intent to  often people check incoming changes on a detailed level  helps to understand what other people changed  refactor stuff that seems wrong  check typos :-)  improves the quality of the code  update is done step by step like kind of a to-do-list  there is Synchronize in Git, but you can not incrementally update (because of the concept of Git) Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 8
  • 9. Things only CVS can do  you can tag projects independant as you go  you can tag single files later  selectivly update only some projects  NOT resolve conflicts when you update (i.e. a xx.launch file that you changed) Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 9
  • 10. CVS Usage is NOT problem free  If you branch you almost never merge (because its so hard)  it was always complicated to figure out what was changed for a certain changeset ?  A "changeset" are merely commits with the same message so it is easy to amend a commit :-)  did you ever tag before and after a commit to log the difference ?  if you develop in HEAD and a version branch und later you have to copy changesets from HEAD to the version branch Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 10
  • 11. More CVS crap  Refactoring (renaming a class) means loosing all your history  Renaming a package, project means loosing all history of all objects in that package/project  If you delete a project it does not get deleted at your collegues workspace committer unless you TELL him. (and he deletes it manually)  If you add a project your collegues wont find out until you TELL them. Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 11
  • 12. And you come to Git...  And people tell you.... the easiest way to use Git is the command line  however the command line is way better than you expect  it was created to actually work with it on a daily base Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 12
  • 13. CVS User Migration Steps Step 2: Euphoria „Git is CVS without its problems, I have“ Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 13
  • 14. Pitfalls in Git  you try to pull before you committed your changes  you push .... EVERYTHING (including all local branches)  you create a new project in the root of the Git Repository directory Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 14
  • 15. Pitfalls in Git II  Merge conflicts are a little more complicated  CVS flags the conflict  Git Pull actually puts a comment in the file (so that it doesnt compile)  Rebases can be scary (rerunning commits on a different branch and hoping that the commits also work there)  Merge conflicts in the middle of a rebase even more  You always have to update everything (no way to exclude a bundle or a file) Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 15
  • 16. More stuff...  CVS users moving to Git think that Git is the solution to everything they missed in CVS  yes moving content between files means that Git still can keep track of the history  try to rename a bundle (just for fun) and then look at the proposed commit (there is “git mv” though)  you hear that the Git repo of the Eclipse platform was corrupted by a single committer (Is Git the right move for me ?) Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 18
  • 17. CVS User Migration Steps Step 3: Realtity Understanding what you can do Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 19
  • 18. Where Git is better than CVS (the centerpiece)  commits  changes collected together in one metaobject called commit  put more effort in creating a good commit  amend a commit if wrong, dont just add a second (like in CVS)  make smaller commits  commits should be a "unit-of-work" useful by itself  a good history is the key to using Git  only Git commits truely show which modifications where committed together  there is no commit in CVS !!! Its just writing a collection of diffs.. Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 20
  • 19. Things only Git can do  Pick some commits from one branch into another (cherrypicking)  Revert commits  Merge branches (and that actually works :-) )  Rebase your local changes on top of the server master  Work on commits in the past  Tag them  Branch from them  Sign them  Reset your workspace to that time in history  If you manually undo the changes in a file it automagically shows the file as unmodified. Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 21
  • 20. Things only Git can do  develop multiple features in parallel without checking-into-the-server- repo  stash your current work, while you do something else and then come back to your work in progress  commit only parts of the changes in a file  freeze a state of your files before they are committed (staging area) Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 22
  • 21. Git is confusing at times  It uses names that CVS uses, but means something different  commit, merge, repo  local tracking branches can have a strategy  git history can be confusing and complicated Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 23
  • 22. Summary  Dont treat Git as if it were CVS.  Getting from CVS to Git  requires you to "re-wire" your brain  get used to a new way of doing things  adapt your way of doing things to retain your workflow as much as possible  Symptoms are similar to learning any kind of new technology  remember XML, Javascript, Objective-C, Modeling, XText, Tycho  Git opens the door for better collaboration and contribution from others Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 25
  • 23. And...one more thing.... ...you can commit in an airplane Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 26
  • 24. Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 27