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

Más contenido relacionado

La actualidad más candente

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
 

La actualidad más candente (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
 

Similar a Git vs cvs ece2011

A Tutorial for GitHub.pdf
A Tutorial for GitHub.pdfA Tutorial for GitHub.pdf
A Tutorial for GitHub.pdfbadrfathallah2
 
A Tutorial for GitHub.pdf
A Tutorial for GitHub.pdfA Tutorial for GitHub.pdf
A Tutorial for GitHub.pdfAmarnadh36
 
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
 

Similar a 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)
 

Último

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
 
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
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
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
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
"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 AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
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
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
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
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
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
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 

Último (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
 
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
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
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
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
"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 AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
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
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
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
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
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
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 

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