SlideShare une entreprise Scribd logo
1  sur  21
Télécharger pour lire hors ligne
Matt Fielding | Creative Director | Panoetic Ltd   Barcamp Bradford 2009




    The basics of
    Version Control
   and how I learnt to love making
   commits and merges


             PANOETIC
                                               ®



                    WEBSITE DESIGN & DEVELOPMENT
Matt Fielding | Creative Director | Panoetic Ltd   Barcamp Bradford 2009




   4 Goals
   Common goals in web development



   u Revisions / History and Accountability
   v Concurrent Editing of Files
   w Manageable 1-way workflow
   x Separate development versions
Matt Fielding | Creative Director | Panoetic Ltd   Barcamp Bradford 2009




   Revisions/History
   and Accountability


   So a file or site has been changed....
   g        When did something get changed?
   g        Why did something get changed?
   g        Who changed it? (or broke it)

   We can go back before the file was changed
   if something has broken.
Matt Fielding | Creative Director | Panoetic Ltd                            Barcamp Bradford 2009




   Concurrent editing
   an example



   u
   	 Client wants                       	 Adam is tasked
                                        v                          	 Bob is tasked with
                                                                   w
   changes to his                       with updating copy and     updating copy and
   website.                             graphics on page headers   graphics on page footers


   x Both take a copy of the site to work on, and do their updates.
   Now, 2 copies exist, neither is fully up to date. Cue screaming
   as 1 person overwrites the changes of the other.
Matt Fielding | Creative Director | Panoetic Ltd             Barcamp Bradford 2009




   1-way workflow
   The end goal of any site is to get it live
   Changes direct to a live site are BAD!

   g        Breaking the site leads to downtime and errors
   g        Keeping a track of who has what version is impossible
   g        Even a simple typo fix can lead to problems and annoyed
            clients.
Matt Fielding | Creative Director | Panoetic Ltd            Barcamp Bradford 2009




   Separate                                        Development
                                                      Versions
   The client asks for new features whilst also asking for some
   typo / bug fixes to the live site.

   Problems

   g        Editing the “live” version puts it out of sync with the
            version developers are expanding.
   g        Editing the development version means untested code may
            go live too early.
Matt Fielding | Creative Director | Panoetic Ltd                               Barcamp Bradford 2009




   Terminology
   of Version Control Systems


       Repository                                  Trunk:                 Checkout
    Central store holding                      Main development        To work on a project,
     the history and files                    “branch” of a project”     you “checkout” a
     for a given project.                                              copy of a version of a
    Usually stored online                          Branch               branch, and the files
    to allow access from                                               you get are your local
      various locations.                      A separate version of     “working tree”. The
                                              a project with its own     repo is unaffected
                                                     history.          until you commit your
                                                                               changes
Matt Fielding | Creative Director | Panoetic Ltd                                Barcamp Bradford 2009




   Terminology
   of Version Control Systems
                                                                        Continued




           Commit                                  Conflict                 Revision
      Send your changes                       When the changes in          A version of the
     to the repository for                    2 versions of a file or    project in a specific
     other people to use.                    branch would overwrite     branch after a commit.
                                              each other if merged.     These can also usually
              Merge                                                        be “tagged” with
                                                                        meaningful names, eg
   Combine 2 or more files                                                  Test Version 3
    or branches together
Matt Fielding | Creative Director | Panoetic Ltd   Barcamp Bradford 2009




   Repository Model
   u Most VCS work with some form of
           central repository.

   v Different developers check out
           “working copies or branches” from
           the repository to work on.

   w They do their alterations and TEST
           their changes.. No changes should be
           commited that don’t work!
Matt Fielding | Creative Director | Panoetic Ltd    Barcamp Bradford 2009




   Repository Model
   continued


   y They “commit” their new version
           back to the repository, annotating any
           changes made.

   z Any non-conflicting changes get
           merged, any conflicts get flagged and
           resolved.
Matt Fielding | Creative Director | Panoetic Ltd                    Barcamp Bradford 2009




   Repository Model
   visually




                                                   branch
                                                                      pull
                                                   commit             merge
                        server



                Main Branch                                 local Branch
Matt Fielding | Creative Director | Panoetic Ltd                         Barcamp Bradford 2009




   Conflicts
   and how to resolve them


   Conflicts occur when a file being committed to the repository
   has been edited in the meantime, and the relevant code seems
   to overlap.

   In this case the VCS will alert of                  The committer can then
   a conflict, and depending on the                >   decide which code to keep
   VCS will display the sections of                    and “resolve” the conflict.
   the file that have the problem
Matt Fielding | Creative Director | Panoetic Ltd              Barcamp Bradford 2009




   History
   and Accountability


   Every time someone commits new
   changes to the repository:

   u A complete history is kept of all files and
           what has been changed.

   v A commit message is required, in which the person
           committing a change outlines exactly what has
           been done. This message is detailed and explains
           properly, eg don’t comment “fixed a bug”
Matt Fielding | Creative Director | Panoetic Ltd                 Barcamp Bradford 2009




   History
   and Accountability


   Every time someone commits new
   changes to the repository:

   w The history stores when and who made the
           changes. (no hiding)

   x The history is browsable for any file or folder, and
           any version of any file can be “diffed” to see what
           changed.
Matt Fielding | Creative Director | Panoetic Ltd        Barcamp Bradford 2009




   Best Practices
   Commit Early, Commit Often


   Do a small meaningful job, test it, and commit it.

   g        Keeps the history easy to follow
   g        Makes reverting a mistake easier
   g        Avoids large merge conflicts
   g        Makes people more targeted in their work
Matt Fielding | Creative Director | Panoetic Ltd           Barcamp Bradford 2009




   Going Live
   A site can be branched as a live release.

   g        The site can then continue to be developed in trunk.

   g        Changes can be made to the live “branch” and pushed to
            the live server.

   g        These can then be “merged” into the trunk prior to
            new release.
Matt Fielding | Creative Director | Panoetic Ltd                                Barcamp Bradford 2009




   Simple Example
                                      Development     Branch    New Branch
                                         Trunk                  Release 1.0

                                      Commit                   Commit

                                      New Feature 1             Bugfix - 1.01
                                      Commit                   Commit

                                      New Feature 2             Bugfix - 1.02
                                                      Merge
                                      Commit



                                     Latest Changes   Branch    New Branch
                                        Merged In               Release 2.0
Matt Fielding | Creative Director | Panoetic Ltd     Barcamp Bradford 2009




   Common VCS’
   Some of the common VCS in use


   CVS                  Concurrent Versions System
   SVN                  Subversion

   Distributed revision control

   GIT              and            Bazaar
Matt Fielding | Creative Director | Panoetic Ltd                 Barcamp Bradford 2009




   Resources
   Visual introduction to version control -
   http://betterexplained.com/articles/a-visual-guide-to-version-control/

   Eric Sink’s guide to version control
   http://www.ericsink.com/scm/source_control.html

   Bazaar - http://bazaar-vcs.org/en/
   Subversion - http://subversion.tigris.org/
   Git - http://git-scm.com/
Matt Fielding | Creative Director | Panoetic Ltd   Barcamp Bradford 2009




                            Questions?
Matt Fielding | Creative Director | Panoetic Ltd                                  Barcamp Bradford 2009




                                Matt Fielding
                                http://mattfielding.net
                                http://www.twitter.com/mattfielding



                                             PANOETIC
                                                                              ®



                                                   WEBSITE DESIGN & DEVELOPMENT




                                http://panoetic.com
                                http://www.twitter.com/panoetic

Contenu connexe

Tendances

AD112: Usability Lessons From the Worlds Largest XPages Project (MWLUG)
AD112: Usability Lessons From the Worlds Largest XPages Project (MWLUG)AD112: Usability Lessons From the Worlds Largest XPages Project (MWLUG)
AD112: Usability Lessons From the Worlds Largest XPages Project (MWLUG)
John Head
 
OpenNTF.org: Celebrating 10 years of community driven open source (Speedgeeki...
OpenNTF.org: Celebrating 10 years of community driven open source (Speedgeeki...OpenNTF.org: Celebrating 10 years of community driven open source (Speedgeeki...
OpenNTF.org: Celebrating 10 years of community driven open source (Speedgeeki...
John Head
 

Tendances (12)

Workflow Management Software with IBM Lotus Notes, Business Process Managemen...
Workflow Management Software with IBM Lotus Notes, Business Process Managemen...Workflow Management Software with IBM Lotus Notes, Business Process Managemen...
Workflow Management Software with IBM Lotus Notes, Business Process Managemen...
 
Verteilte SoftwareEntwicklung 2011 - von klassischen Modellen bis Scrum und S...
Verteilte SoftwareEntwicklung 2011 - von klassischen Modellen bis Scrum und S...Verteilte SoftwareEntwicklung 2011 - von klassischen Modellen bis Scrum und S...
Verteilte SoftwareEntwicklung 2011 - von klassischen Modellen bis Scrum und S...
 
Delphi Prism Datasheet 2009
Delphi Prism Datasheet 2009Delphi Prism Datasheet 2009
Delphi Prism Datasheet 2009
 
Super feats of integration x pages with symphony sharepoint and office
Super feats of integration  x pages with symphony sharepoint and officeSuper feats of integration  x pages with symphony sharepoint and office
Super feats of integration x pages with symphony sharepoint and office
 
Agiles Projektmanagement skaliert über mehrere Kontinente
Agiles Projektmanagement skaliert über mehrere KontinenteAgiles Projektmanagement skaliert über mehrere Kontinente
Agiles Projektmanagement skaliert über mehrere Kontinente
 
Lotus Notes 8.5 version to version comparison
Lotus Notes 8.5 version to version comparisonLotus Notes 8.5 version to version comparison
Lotus Notes 8.5 version to version comparison
 
Domino app dev competitive advantage final
Domino app dev competitive advantage finalDomino app dev competitive advantage final
Domino app dev competitive advantage final
 
IBM Forms: Streamline your business, reduce cost and paper
IBM Forms: Streamline your business, reduce cost and paperIBM Forms: Streamline your business, reduce cost and paper
IBM Forms: Streamline your business, reduce cost and paper
 
AD112: Usability Lessons From the Worlds Largest XPages Project (MWLUG)
AD112: Usability Lessons From the Worlds Largest XPages Project (MWLUG)AD112: Usability Lessons From the Worlds Largest XPages Project (MWLUG)
AD112: Usability Lessons From the Worlds Largest XPages Project (MWLUG)
 
Droidcon - Unify Insights
Droidcon - Unify InsightsDroidcon - Unify Insights
Droidcon - Unify Insights
 
OpenNTF.org: Celebrating 10 years of community driven open source (Speedgeeki...
OpenNTF.org: Celebrating 10 years of community driven open source (Speedgeeki...OpenNTF.org: Celebrating 10 years of community driven open source (Speedgeeki...
OpenNTF.org: Celebrating 10 years of community driven open source (Speedgeeki...
 
Moodle Assignments - the Next Generation
Moodle Assignments - the Next GenerationMoodle Assignments - the Next Generation
Moodle Assignments - the Next Generation
 

Similaire à The basics of version control

Hol262 Building%20 Info Path%20 Forms%20that%20 Run%20as%20 Both%20 Rich%20 C...
Hol262 Building%20 Info Path%20 Forms%20that%20 Run%20as%20 Both%20 Rich%20 C...Hol262 Building%20 Info Path%20 Forms%20that%20 Run%20as%20 Both%20 Rich%20 C...
Hol262 Building%20 Info Path%20 Forms%20that%20 Run%20as%20 Both%20 Rich%20 C...
LiquidHub
 
Hol262 Building%20 Info Path%20 Forms%20that%20 Run%20as%20 Both%20 Rich%20 C...
Hol262 Building%20 Info Path%20 Forms%20that%20 Run%20as%20 Both%20 Rich%20 C...Hol262 Building%20 Info Path%20 Forms%20that%20 Run%20as%20 Both%20 Rich%20 C...
Hol262 Building%20 Info Path%20 Forms%20that%20 Run%20as%20 Both%20 Rich%20 C...
LiquidHub
 
Whats New In LabVIEW 2010
Whats New In LabVIEW 2010Whats New In LabVIEW 2010
Whats New In LabVIEW 2010
Danny Thomson
 

Similaire à The basics of version control (20)

Chicago alm user group git demo script and notes
Chicago alm user group   git demo script and notesChicago alm user group   git demo script and notes
Chicago alm user group git demo script and notes
 
Empowering business users with hybrid solutions
Empowering business users with hybrid solutionsEmpowering business users with hybrid solutions
Empowering business users with hybrid solutions
 
Assure Project Harmonizer
Assure Project HarmonizerAssure Project Harmonizer
Assure Project Harmonizer
 
Acrobat 9 AEC
Acrobat 9 AECAcrobat 9 AEC
Acrobat 9 AEC
 
IBM Application Delivery Foundation for z Systems
IBM Application Delivery Foundation for z SystemsIBM Application Delivery Foundation for z Systems
IBM Application Delivery Foundation for z Systems
 
Flash Catalyst at Flex Camp Orange County
Flash Catalyst at Flex Camp Orange CountyFlash Catalyst at Flex Camp Orange County
Flash Catalyst at Flex Camp Orange County
 
Erfahrung aus der Praxis & Roadmaps zu Domino, Verse und Sametime
Erfahrung aus der Praxis & Roadmaps zu Domino, Verse und SametimeErfahrung aus der Praxis & Roadmaps zu Domino, Verse und Sametime
Erfahrung aus der Praxis & Roadmaps zu Domino, Verse und Sametime
 
Hol262 Building%20 Info Path%20 Forms%20that%20 Run%20as%20 Both%20 Rich%20 C...
Hol262 Building%20 Info Path%20 Forms%20that%20 Run%20as%20 Both%20 Rich%20 C...Hol262 Building%20 Info Path%20 Forms%20that%20 Run%20as%20 Both%20 Rich%20 C...
Hol262 Building%20 Info Path%20 Forms%20that%20 Run%20as%20 Both%20 Rich%20 C...
 
Hol262 Building%20 Info Path%20 Forms%20that%20 Run%20as%20 Both%20 Rich%20 C...
Hol262 Building%20 Info Path%20 Forms%20that%20 Run%20as%20 Both%20 Rich%20 C...Hol262 Building%20 Info Path%20 Forms%20that%20 Run%20as%20 Both%20 Rich%20 C...
Hol262 Building%20 Info Path%20 Forms%20that%20 Run%20as%20 Both%20 Rich%20 C...
 
Magento Community Hangouts 10 Feb, 2021 Composer 2 Support
Magento Community Hangouts  10 Feb, 2021 Composer 2 SupportMagento Community Hangouts  10 Feb, 2021 Composer 2 Support
Magento Community Hangouts 10 Feb, 2021 Composer 2 Support
 
Domino Vs Exchange App Dev
Domino Vs Exchange App DevDomino Vs Exchange App Dev
Domino Vs Exchange App Dev
 
Converting SAP Business Objects to a New Architecture Solution
Converting SAP Business Objects to a New Architecture SolutionConverting SAP Business Objects to a New Architecture Solution
Converting SAP Business Objects to a New Architecture Solution
 
Cognosv1
Cognosv1Cognosv1
Cognosv1
 
Svn Basic Tutorial
Svn Basic TutorialSvn Basic Tutorial
Svn Basic Tutorial
 
Whats New In LabVIEW 2010
Whats New In LabVIEW 2010Whats New In LabVIEW 2010
Whats New In LabVIEW 2010
 
Connect 2 Cocomo
Connect 2 CocomoConnect 2 Cocomo
Connect 2 Cocomo
 
3DC Intro to Git Workshop
3DC Intro to Git Workshop3DC Intro to Git Workshop
3DC Intro to Git Workshop
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Conspectus January 2010 News Bulletin
Conspectus January 2010 News BulletinConspectus January 2010 News Bulletin
Conspectus January 2010 News Bulletin
 
Mainframe DevOps: A Zowe CLI-enabled Roadmap
Mainframe DevOps: A Zowe CLI-enabled RoadmapMainframe DevOps: A Zowe CLI-enabled Roadmap
Mainframe DevOps: A Zowe CLI-enabled Roadmap
 

Dernier

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Dernier (20)

Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
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...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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)
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
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...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 

The basics of version control

  • 1. Matt Fielding | Creative Director | Panoetic Ltd Barcamp Bradford 2009 The basics of Version Control and how I learnt to love making commits and merges PANOETIC ® WEBSITE DESIGN & DEVELOPMENT
  • 2. Matt Fielding | Creative Director | Panoetic Ltd Barcamp Bradford 2009 4 Goals Common goals in web development u Revisions / History and Accountability v Concurrent Editing of Files w Manageable 1-way workflow x Separate development versions
  • 3. Matt Fielding | Creative Director | Panoetic Ltd Barcamp Bradford 2009 Revisions/History and Accountability So a file or site has been changed.... g When did something get changed? g Why did something get changed? g Who changed it? (or broke it) We can go back before the file was changed if something has broken.
  • 4. Matt Fielding | Creative Director | Panoetic Ltd Barcamp Bradford 2009 Concurrent editing an example u Client wants Adam is tasked v Bob is tasked with w changes to his with updating copy and updating copy and website. graphics on page headers graphics on page footers x Both take a copy of the site to work on, and do their updates. Now, 2 copies exist, neither is fully up to date. Cue screaming as 1 person overwrites the changes of the other.
  • 5. Matt Fielding | Creative Director | Panoetic Ltd Barcamp Bradford 2009 1-way workflow The end goal of any site is to get it live Changes direct to a live site are BAD! g Breaking the site leads to downtime and errors g Keeping a track of who has what version is impossible g Even a simple typo fix can lead to problems and annoyed clients.
  • 6. Matt Fielding | Creative Director | Panoetic Ltd Barcamp Bradford 2009 Separate Development Versions The client asks for new features whilst also asking for some typo / bug fixes to the live site. Problems g Editing the “live” version puts it out of sync with the version developers are expanding. g Editing the development version means untested code may go live too early.
  • 7. Matt Fielding | Creative Director | Panoetic Ltd Barcamp Bradford 2009 Terminology of Version Control Systems Repository Trunk: Checkout Central store holding Main development To work on a project, the history and files “branch” of a project” you “checkout” a for a given project. copy of a version of a Usually stored online Branch branch, and the files to allow access from you get are your local various locations. A separate version of “working tree”. The a project with its own repo is unaffected history. until you commit your changes
  • 8. Matt Fielding | Creative Director | Panoetic Ltd Barcamp Bradford 2009 Terminology of Version Control Systems Continued Commit Conflict Revision Send your changes When the changes in A version of the to the repository for 2 versions of a file or project in a specific other people to use. branch would overwrite branch after a commit. each other if merged. These can also usually Merge be “tagged” with meaningful names, eg Combine 2 or more files Test Version 3 or branches together
  • 9. Matt Fielding | Creative Director | Panoetic Ltd Barcamp Bradford 2009 Repository Model u Most VCS work with some form of central repository. v Different developers check out “working copies or branches” from the repository to work on. w They do their alterations and TEST their changes.. No changes should be commited that don’t work!
  • 10. Matt Fielding | Creative Director | Panoetic Ltd Barcamp Bradford 2009 Repository Model continued y They “commit” their new version back to the repository, annotating any changes made. z Any non-conflicting changes get merged, any conflicts get flagged and resolved.
  • 11. Matt Fielding | Creative Director | Panoetic Ltd Barcamp Bradford 2009 Repository Model visually branch pull commit merge server Main Branch local Branch
  • 12. Matt Fielding | Creative Director | Panoetic Ltd Barcamp Bradford 2009 Conflicts and how to resolve them Conflicts occur when a file being committed to the repository has been edited in the meantime, and the relevant code seems to overlap. In this case the VCS will alert of The committer can then a conflict, and depending on the > decide which code to keep VCS will display the sections of and “resolve” the conflict. the file that have the problem
  • 13. Matt Fielding | Creative Director | Panoetic Ltd Barcamp Bradford 2009 History and Accountability Every time someone commits new changes to the repository: u A complete history is kept of all files and what has been changed. v A commit message is required, in which the person committing a change outlines exactly what has been done. This message is detailed and explains properly, eg don’t comment “fixed a bug”
  • 14. Matt Fielding | Creative Director | Panoetic Ltd Barcamp Bradford 2009 History and Accountability Every time someone commits new changes to the repository: w The history stores when and who made the changes. (no hiding) x The history is browsable for any file or folder, and any version of any file can be “diffed” to see what changed.
  • 15. Matt Fielding | Creative Director | Panoetic Ltd Barcamp Bradford 2009 Best Practices Commit Early, Commit Often Do a small meaningful job, test it, and commit it. g Keeps the history easy to follow g Makes reverting a mistake easier g Avoids large merge conflicts g Makes people more targeted in their work
  • 16. Matt Fielding | Creative Director | Panoetic Ltd Barcamp Bradford 2009 Going Live A site can be branched as a live release. g The site can then continue to be developed in trunk. g Changes can be made to the live “branch” and pushed to the live server. g These can then be “merged” into the trunk prior to new release.
  • 17. Matt Fielding | Creative Director | Panoetic Ltd Barcamp Bradford 2009 Simple Example Development Branch New Branch Trunk Release 1.0 Commit Commit New Feature 1 Bugfix - 1.01 Commit Commit New Feature 2 Bugfix - 1.02 Merge Commit Latest Changes Branch New Branch Merged In Release 2.0
  • 18. Matt Fielding | Creative Director | Panoetic Ltd Barcamp Bradford 2009 Common VCS’ Some of the common VCS in use CVS Concurrent Versions System SVN Subversion Distributed revision control GIT and Bazaar
  • 19. Matt Fielding | Creative Director | Panoetic Ltd Barcamp Bradford 2009 Resources Visual introduction to version control - http://betterexplained.com/articles/a-visual-guide-to-version-control/ Eric Sink’s guide to version control http://www.ericsink.com/scm/source_control.html Bazaar - http://bazaar-vcs.org/en/ Subversion - http://subversion.tigris.org/ Git - http://git-scm.com/
  • 20. Matt Fielding | Creative Director | Panoetic Ltd Barcamp Bradford 2009 Questions?
  • 21. Matt Fielding | Creative Director | Panoetic Ltd Barcamp Bradford 2009 Matt Fielding http://mattfielding.net http://www.twitter.com/mattfielding PANOETIC ® WEBSITE DESIGN & DEVELOPMENT http://panoetic.com http://www.twitter.com/panoetic