SlideShare a Scribd company logo
1 of 18
> Source Control
    > What you need to know.




               Davey McGlade - Kainos
> Intro
• Solution Architect ~15 years experience
• In Kainos ~ 4 years
• Focus on:
   •   .NET
   •   Dynamics CRM 2011
   •   SharePoint 2010
   •   Integration technologies
> What is Source Control?
• In essence, a backup repository for your work.

• Two types:
   • Centralised: All code on a central server
   • Distributed: Everyone gets a copy locally

• Definitely not:
   • Google Drive
   • Drop Box
   • C:
   • Email.
> Why?
Recoverability          Don’t lose work

     Communication      Easily see team changes

Versioning              Compare and contrast

     Accountability     Who made the change?

Solve Problems          Find bugs, try new things

     Facilitate Reuse   Avoid writing duplicate code
> Just code?


No
Anything and everything that is used to build the solution:
   – Tools / Installers
   – Solution Build Scripts
   – Database Build scripts
   – Some include Functional Specifications & Design Docs

Aids the transition into support.
> Terms
Trunk        • The main ‘code line’. Contains the master code.
Branch       • A deviation off the main code line.
Fork         • Independent development on a copy from original
Commit       • ‘Saving’ your code to the local/central repository
Push         • Transfer changesets from the local to central
Pull         • Retrieving changes from the central repository
Change set   • The set of all delta changes
Merge        • Combining your code changes with existing code
Tag          • Marking a specific event, i.e. release 1.0 etc.
> Centralised
• A single ‘master’ copy of your code, held centrally on a server

• Changes are ‘committed’ to this central library.

• Once ‘committed’, other programmers can see the change.

• You can then ‘pull’ this change to your local machine.

• Examples of centralised source control systems
   – CVS, Subversion (or SVN) Team Foundation Server, Visual
     SourceSafe
>     Workflow (Centralised)

1. Access the central server and ‘pull’ down the changes others
   have made

2. Make your changes, and test them

3. Commit (*) your changes to the central server, so other
   programmers can see them.

(*) Work out the merge conflicts (windiff, built in tools etc.)
>    Example Workflows (Centralised)

• Branch by Release
                             V1.0            V1.1            V1.2
                    Release 1
                                          Branch                    Merge

                           Release 2
                                          V2.0         V2.1         V2.2


• Branch by Feature / Task
                                 Feature 2          Branch                  Merge

             Main Trunk

                                 Branch                             Merge

               Feature 1
> Distributed
• Each developer ‘clones’ a copy of a repository to their own
  machine. The full history of the project is on their own hard
  drive.

• Two phase commits: You commit first to your local staging
  area, and then push to the repository.

• Central Repository is not mandatory, but you usually have one

• Examples of distributed source control systems
   – Git, Mercurial, Bazaar
> Workflow (Distributed)
 • Simple
        Init/Clone   Add   Commit   Push




 • Branch by Member/ Features
                                           V1.0   V1.1
       Main Trunk

Development Trunk
      Developer 1

      Developer 2
> Is DVCS ‘better’?
• It’s extremely quick. No network traffic, only local file lookups.

• You remove the risk of poor networks. Centralised checkouts
  typically aren’t atomic. Visual SourceSafe = nightmare.

• You can work locally, without affecting others. You can share work
  amongst a select few, without pushing to the team.

• You can work offline, and merge your changes when you’re online
  again.

• You have built in redundancy as the work is distributed amongst
  team members.
> Git / Github demo


   Demo Time
> Branching & Merging
                                     Antipatterns
Some examples:
• Merge Paranoia—avoiding merging at all cost, usually because of a fear of the
   consequences.

•     Big Bang Merge—deferring branch merging to the end of the development effort
      and attempting to merge all branches simultaneously.

•     Never-Ending Merge—continuous merging activity because there is always more
      to merge.

•     Temporary Branches—branching for changing reasons, so the branch becomes a
      permanent temporary workspace.

•     Development Freeze—stopping all development activities while
      branching, merging, and building new base lines.

Source - http://branchingguidance.codeplex.com/wikipage?title=Branching%20and%20Merging%20Anti-Patterns
> Taking it further
• Continuous Integration, Continuous Delivery
  •   Unit Testing
  •   Code Styling
  •   Performance Monitoring
  •   Broken Build fun


• Feature toggling – Martin Fowler,
       http://martinfowler.com/bliki/FeatureToggle.html
> Tools
• GitHub & Git
   – www.github.com
   – http://git-scm.com/


• TortoiseSVN
   – http://tortoisesvn.net/

• TortoiseGIT
   – http://code.google.com/p/tortoisegit/wiki/Download


• Visual HG
   – http://visualhg.codeplex.com/

• Git & SVN together
   – http://infotexture.net/2010/02/git-to-svn-and-back-again/
> Learning Resources
• Git online interactive course
    – http://try.github.com/levels/1/challenges/1


• Free Git Book
    – http://git-scm.com/book


• Intro to SVN (Pluralsight Trial)
    – http://pluralsight.com/training/Courses/TableOfContents/intro-to-svn


• Mercurial Intro
    – http://hginit.com/


• Git to SVN course
    – http://git.or.cz/course/svn.html
> Contact Details
• Web – daveymcglade.net

• Twitter – @djmcglade

• Slides – Will be up on slideshare / website

More Related Content

What's hot

2013 10-28 php ug presentation - ci using phing and hudson
2013 10-28 php ug presentation - ci using phing and hudson2013 10-28 php ug presentation - ci using phing and hudson
2013 10-28 php ug presentation - ci using phing and hudsonShreeniwas Iyer
 
Jenkins Meetup Pune
Jenkins Meetup PuneJenkins Meetup Pune
Jenkins Meetup PuneUmesh Kumhar
 
Jenkins review buddy
Jenkins review buddyJenkins review buddy
Jenkins review buddyAske Olsson
 
Version Control and Continuous Integration
Version Control and Continuous IntegrationVersion Control and Continuous Integration
Version Control and Continuous IntegrationGeff Henderson Chang
 
Yale Jenkins Show and Tell
Yale Jenkins Show and TellYale Jenkins Show and Tell
Yale Jenkins Show and TellE. Camden Fisher
 
Let’s start Continuous Integration with jenkins
Let’s start Continuous Integration with jenkinsLet’s start Continuous Integration with jenkins
Let’s start Continuous Integration with jenkinsTomohide Kakeya
 
Supermondays: Jenkins CI lightning talk
Supermondays: Jenkins CI lightning talkSupermondays: Jenkins CI lightning talk
Supermondays: Jenkins CI lightning talkMichael Peacock
 
Continuous Integration (Jenkins/Hudson)
Continuous Integration (Jenkins/Hudson)Continuous Integration (Jenkins/Hudson)
Continuous Integration (Jenkins/Hudson)Dennys Hsieh
 
Eclipse DemoCamp Bucharest 2014 - Continuous Integration Jenkins/Hudson
Eclipse DemoCamp Bucharest 2014 - Continuous Integration Jenkins/HudsonEclipse DemoCamp Bucharest 2014 - Continuous Integration Jenkins/Hudson
Eclipse DemoCamp Bucharest 2014 - Continuous Integration Jenkins/HudsonVladLica
 
Jenkins For One
Jenkins For OneJenkins For One
Jenkins For OneMark Waite
 
Teamcity CI Server
Teamcity CI ServerTeamcity CI Server
Teamcity CI ServerKnoldus Inc.
 
Jenkins - From Continuous Integration to Continuous Delivery
Jenkins - From Continuous Integration to Continuous DeliveryJenkins - From Continuous Integration to Continuous Delivery
Jenkins - From Continuous Integration to Continuous DeliveryVirendra Bhalothia
 
Continuous Delivery Using Jenkins
Continuous Delivery Using JenkinsContinuous Delivery Using Jenkins
Continuous Delivery Using JenkinsCliffano Subagio
 
Continuous integration
Continuous integrationContinuous integration
Continuous integrationAaron Eden
 
Introduction to Version Control
Introduction to Version ControlIntroduction to Version Control
Introduction to Version ControlJeremy Coates
 
Why NXTware Remote for Jenkins
Why NXTware Remote for JenkinsWhy NXTware Remote for Jenkins
Why NXTware Remote for Jenkinsecubemarketing
 
Rise of the Machines - Automate your Development
Rise of the Machines - Automate your DevelopmentRise of the Machines - Automate your Development
Rise of the Machines - Automate your DevelopmentSven Peters
 
JUC Europe 2015: Bringing CD at Cloud-Scale with Jenkins, Docker and "Tiger"
JUC Europe 2015: Bringing CD at Cloud-Scale with Jenkins, Docker and "Tiger"JUC Europe 2015: Bringing CD at Cloud-Scale with Jenkins, Docker and "Tiger"
JUC Europe 2015: Bringing CD at Cloud-Scale with Jenkins, Docker and "Tiger"CloudBees
 

What's hot (20)

2013 10-28 php ug presentation - ci using phing and hudson
2013 10-28 php ug presentation - ci using phing and hudson2013 10-28 php ug presentation - ci using phing and hudson
2013 10-28 php ug presentation - ci using phing and hudson
 
Jenkins Meetup Pune
Jenkins Meetup PuneJenkins Meetup Pune
Jenkins Meetup Pune
 
Jenkins review buddy
Jenkins review buddyJenkins review buddy
Jenkins review buddy
 
Version Control and Continuous Integration
Version Control and Continuous IntegrationVersion Control and Continuous Integration
Version Control and Continuous Integration
 
Yale Jenkins Show and Tell
Yale Jenkins Show and TellYale Jenkins Show and Tell
Yale Jenkins Show and Tell
 
Let’s start Continuous Integration with jenkins
Let’s start Continuous Integration with jenkinsLet’s start Continuous Integration with jenkins
Let’s start Continuous Integration with jenkins
 
Supermondays: Jenkins CI lightning talk
Supermondays: Jenkins CI lightning talkSupermondays: Jenkins CI lightning talk
Supermondays: Jenkins CI lightning talk
 
Jenkins CI
Jenkins CIJenkins CI
Jenkins CI
 
Continuous Integration (Jenkins/Hudson)
Continuous Integration (Jenkins/Hudson)Continuous Integration (Jenkins/Hudson)
Continuous Integration (Jenkins/Hudson)
 
Eclipse DemoCamp Bucharest 2014 - Continuous Integration Jenkins/Hudson
Eclipse DemoCamp Bucharest 2014 - Continuous Integration Jenkins/HudsonEclipse DemoCamp Bucharest 2014 - Continuous Integration Jenkins/Hudson
Eclipse DemoCamp Bucharest 2014 - Continuous Integration Jenkins/Hudson
 
Jenkins For One
Jenkins For OneJenkins For One
Jenkins For One
 
Teamcity CI Server
Teamcity CI ServerTeamcity CI Server
Teamcity CI Server
 
Jenkins - From Continuous Integration to Continuous Delivery
Jenkins - From Continuous Integration to Continuous DeliveryJenkins - From Continuous Integration to Continuous Delivery
Jenkins - From Continuous Integration to Continuous Delivery
 
Continuous Delivery Using Jenkins
Continuous Delivery Using JenkinsContinuous Delivery Using Jenkins
Continuous Delivery Using Jenkins
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
 
Jenkins tutorial
Jenkins tutorialJenkins tutorial
Jenkins tutorial
 
Introduction to Version Control
Introduction to Version ControlIntroduction to Version Control
Introduction to Version Control
 
Why NXTware Remote for Jenkins
Why NXTware Remote for JenkinsWhy NXTware Remote for Jenkins
Why NXTware Remote for Jenkins
 
Rise of the Machines - Automate your Development
Rise of the Machines - Automate your DevelopmentRise of the Machines - Automate your Development
Rise of the Machines - Automate your Development
 
JUC Europe 2015: Bringing CD at Cloud-Scale with Jenkins, Docker and "Tiger"
JUC Europe 2015: Bringing CD at Cloud-Scale with Jenkins, Docker and "Tiger"JUC Europe 2015: Bringing CD at Cloud-Scale with Jenkins, Docker and "Tiger"
JUC Europe 2015: Bringing CD at Cloud-Scale with Jenkins, Docker and "Tiger"
 

Similar to Source control - what you need to know

SQL Server DevOps Jumpstart
SQL Server DevOps JumpstartSQL Server DevOps Jumpstart
SQL Server DevOps JumpstartOri Donner
 
Source version control using subversion
Source version control using subversionSource version control using subversion
Source version control using subversionMangesh Bhujbal
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous IntegrationXPDays
 
Jenkins_1679702972.pdf
Jenkins_1679702972.pdfJenkins_1679702972.pdf
Jenkins_1679702972.pdfMahmoudAlnmr1
 
Source Control with Domino Designer 8.5.3 and Git (DanNotes, November 28, 2012)
Source Control with Domino Designer 8.5.3 and Git (DanNotes, November 28, 2012)Source Control with Domino Designer 8.5.3 and Git (DanNotes, November 28, 2012)
Source Control with Domino Designer 8.5.3 and Git (DanNotes, November 28, 2012)Per Henrik Lausten
 
Make It Cooler: Using Decentralized Version Control
Make It Cooler: Using Decentralized Version ControlMake It Cooler: Using Decentralized Version Control
Make It Cooler: Using Decentralized Version Controlindiver
 
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...E. Camden Fisher
 
Continuous delivery @wcap 5-09-2013
Continuous delivery   @wcap 5-09-2013Continuous delivery   @wcap 5-09-2013
Continuous delivery @wcap 5-09-2013David Funaro
 
Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...
Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...
Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...Michel Buczynski
 
Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...
Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...
Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...Chocolatey Software
 
Embracing Distributed Version Control
Embracing Distributed Version ControlEmbracing Distributed Version Control
Embracing Distributed Version ControlNowell Strite
 
Agile & ALM tools
Agile & ALM toolsAgile & ALM tools
Agile & ALM toolsLarry Cai
 
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
 
Visual Studio Release Management - New weltanschauung or natural evolution? @...
Visual Studio Release Management - New weltanschauung or natural evolution? @...Visual Studio Release Management - New weltanschauung or natural evolution? @...
Visual Studio Release Management - New weltanschauung or natural evolution? @...Giulio Vian
 

Similar to Source control - what you need to know (20)

SQL Server DevOps Jumpstart
SQL Server DevOps JumpstartSQL Server DevOps Jumpstart
SQL Server DevOps Jumpstart
 
Source version control using subversion
Source version control using subversionSource version control using subversion
Source version control using subversion
 
Versioning for Developers
Versioning for DevelopersVersioning for Developers
Versioning for Developers
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous Integration
 
Jenkins_1679702972.pdf
Jenkins_1679702972.pdfJenkins_1679702972.pdf
Jenkins_1679702972.pdf
 
jenkins.pdf
jenkins.pdfjenkins.pdf
jenkins.pdf
 
Source Control with Domino Designer 8.5.3 and Git (DanNotes, November 28, 2012)
Source Control with Domino Designer 8.5.3 and Git (DanNotes, November 28, 2012)Source Control with Domino Designer 8.5.3 and Git (DanNotes, November 28, 2012)
Source Control with Domino Designer 8.5.3 and Git (DanNotes, November 28, 2012)
 
Git
GitGit
Git
 
Make It Cooler: Using Decentralized Version Control
Make It Cooler: Using Decentralized Version ControlMake It Cooler: Using Decentralized Version Control
Make It Cooler: Using Decentralized Version Control
 
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
 
Continuous delivery @wcap 5-09-2013
Continuous delivery   @wcap 5-09-2013Continuous delivery   @wcap 5-09-2013
Continuous delivery @wcap 5-09-2013
 
Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...
Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...
Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...
 
Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...
Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...
Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...
 
Embracing Distributed Version Control
Embracing Distributed Version ControlEmbracing Distributed Version Control
Embracing Distributed Version Control
 
Agile & ALM tools
Agile & ALM toolsAgile & ALM tools
Agile & ALM tools
 
Git
GitGit
Git
 
GIT In Detail
GIT In DetailGIT In Detail
GIT In Detail
 
Switching to Git
Switching to GitSwitching to Git
Switching to Git
 
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
 
Visual Studio Release Management - New weltanschauung or natural evolution? @...
Visual Studio Release Management - New weltanschauung or natural evolution? @...Visual Studio Release Management - New weltanschauung or natural evolution? @...
Visual Studio Release Management - New weltanschauung or natural evolution? @...
 

Recently uploaded

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
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 2024The Digital Insurer
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...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
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
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
 
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
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
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
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
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 slidevu2urc
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
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
 

Recently uploaded (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
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
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
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
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
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
 
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
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 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)
 

Source control - what you need to know

  • 1. > Source Control > What you need to know. Davey McGlade - Kainos
  • 2. > Intro • Solution Architect ~15 years experience • In Kainos ~ 4 years • Focus on: • .NET • Dynamics CRM 2011 • SharePoint 2010 • Integration technologies
  • 3. > What is Source Control? • In essence, a backup repository for your work. • Two types: • Centralised: All code on a central server • Distributed: Everyone gets a copy locally • Definitely not: • Google Drive • Drop Box • C: • Email.
  • 4. > Why? Recoverability Don’t lose work Communication Easily see team changes Versioning Compare and contrast Accountability Who made the change? Solve Problems Find bugs, try new things Facilitate Reuse Avoid writing duplicate code
  • 5. > Just code? No Anything and everything that is used to build the solution: – Tools / Installers – Solution Build Scripts – Database Build scripts – Some include Functional Specifications & Design Docs Aids the transition into support.
  • 6. > Terms Trunk • The main ‘code line’. Contains the master code. Branch • A deviation off the main code line. Fork • Independent development on a copy from original Commit • ‘Saving’ your code to the local/central repository Push • Transfer changesets from the local to central Pull • Retrieving changes from the central repository Change set • The set of all delta changes Merge • Combining your code changes with existing code Tag • Marking a specific event, i.e. release 1.0 etc.
  • 7. > Centralised • A single ‘master’ copy of your code, held centrally on a server • Changes are ‘committed’ to this central library. • Once ‘committed’, other programmers can see the change. • You can then ‘pull’ this change to your local machine. • Examples of centralised source control systems – CVS, Subversion (or SVN) Team Foundation Server, Visual SourceSafe
  • 8. > Workflow (Centralised) 1. Access the central server and ‘pull’ down the changes others have made 2. Make your changes, and test them 3. Commit (*) your changes to the central server, so other programmers can see them. (*) Work out the merge conflicts (windiff, built in tools etc.)
  • 9. > Example Workflows (Centralised) • Branch by Release V1.0 V1.1 V1.2 Release 1 Branch Merge Release 2 V2.0 V2.1 V2.2 • Branch by Feature / Task Feature 2 Branch Merge Main Trunk Branch Merge Feature 1
  • 10. > Distributed • Each developer ‘clones’ a copy of a repository to their own machine. The full history of the project is on their own hard drive. • Two phase commits: You commit first to your local staging area, and then push to the repository. • Central Repository is not mandatory, but you usually have one • Examples of distributed source control systems – Git, Mercurial, Bazaar
  • 11. > Workflow (Distributed) • Simple Init/Clone Add Commit Push • Branch by Member/ Features V1.0 V1.1 Main Trunk Development Trunk Developer 1 Developer 2
  • 12. > Is DVCS ‘better’? • It’s extremely quick. No network traffic, only local file lookups. • You remove the risk of poor networks. Centralised checkouts typically aren’t atomic. Visual SourceSafe = nightmare. • You can work locally, without affecting others. You can share work amongst a select few, without pushing to the team. • You can work offline, and merge your changes when you’re online again. • You have built in redundancy as the work is distributed amongst team members.
  • 13. > Git / Github demo Demo Time
  • 14. > Branching & Merging Antipatterns Some examples: • Merge Paranoia—avoiding merging at all cost, usually because of a fear of the consequences. • Big Bang Merge—deferring branch merging to the end of the development effort and attempting to merge all branches simultaneously. • Never-Ending Merge—continuous merging activity because there is always more to merge. • Temporary Branches—branching for changing reasons, so the branch becomes a permanent temporary workspace. • Development Freeze—stopping all development activities while branching, merging, and building new base lines. Source - http://branchingguidance.codeplex.com/wikipage?title=Branching%20and%20Merging%20Anti-Patterns
  • 15. > Taking it further • Continuous Integration, Continuous Delivery • Unit Testing • Code Styling • Performance Monitoring • Broken Build fun • Feature toggling – Martin Fowler, http://martinfowler.com/bliki/FeatureToggle.html
  • 16. > Tools • GitHub & Git – www.github.com – http://git-scm.com/ • TortoiseSVN – http://tortoisesvn.net/ • TortoiseGIT – http://code.google.com/p/tortoisegit/wiki/Download • Visual HG – http://visualhg.codeplex.com/ • Git & SVN together – http://infotexture.net/2010/02/git-to-svn-and-back-again/
  • 17. > Learning Resources • Git online interactive course – http://try.github.com/levels/1/challenges/1 • Free Git Book – http://git-scm.com/book • Intro to SVN (Pluralsight Trial) – http://pluralsight.com/training/Courses/TableOfContents/intro-to-svn • Mercurial Intro – http://hginit.com/ • Git to SVN course – http://git.or.cz/course/svn.html
  • 18. > Contact Details • Web – daveymcglade.net • Twitter – @djmcglade • Slides – Will be up on slideshare / website