Introduction to SVN


by scmGalaxy.com

About Me !

Rajesh
Facebook Twitter LinkedIn
DevOps@RajeshKumar.xyz

About this Course

  • Basic introduction to SVN
  • Windows based with Tortoise SVN
  • Working knowledge vs details

About SVN

Course Outline

  • Introduction to SVN
  • Setting up SVN
  • Basic Commands
  • Branching and Merging
  • Best Practices

Outline

  • What is Source Control?
  • About SVN
  • Architecture
  • Repository Structure

What is Source Control?

  • Code storage
  • Versioned
  • Facilitates multiple developers

Types of Source Control

  • Locking
  • Merging
  • Distributed

History of SVN

  • Created by CollabNet in 2000
    • Designed to be like CVS but better
  • Became a top-level Apache project in Feb 2010

About SVN


  • Merge based
    • Developers check out local copies of code
    • Changes to the same file are ‘merged’
  • Commits are atomic
  • Uses properties for metadata
  • Branching and tagging are copies
  • Different implementations
Basic Architecture
  • Like a shared file system
    • But versioned!


Using SVN

Repository Structure


  • A repository is a big tree!

Branches


  • Branched code goes here
  • Uses a copy to be efficient
    • Only differences
  • Can branch any part of code
  • Branches are like new trees

Tags


  • Just a name for a revision
  • Also is a copy, but read only
    • Doesn’t take up additional space

Tags

Trunk

  • Main code line
  • Active development happens on trunk

Summary

  • What is Source Control?
  • About SVN
  • Architecture
  • Repository Structure

Setting up SVN

Outline

  • Installing SVN Server
  • Creating a Repository
  • Installing Tortoise SVN
  • Initial Checkout
  • First Commit

Summary

  • Installing SVN Server
  • Creating a Repository
  • Installing Tortoise SVN
  • Initial Checkout
  • First Commit

Basic Commands

Outline

  • Add / Delete
  • Rename
  • Blame
  • Update
  • Ignore
  • Revert
  • Properties

Summary

  • Add / Delete
  • Rename
  • Blame
  • Update
  • Ignore
  • Revert
  • Properties

Branching

Outline

  • What is a branch?
  • Creating a branch
  • Switching
  • Merging
  • Conflicts
  • Tagging

What is a branch?

Branching basics

  • Can branch from any point in the code
  • Branches don’t have to merge back
  • Branch = copy (cheap copy)

Reasons for branching

  • Branch for a feature
  • Branch for a release
  • Branch for different version

Summary

  • What is a branch?
  • Creating a branch
  • Switching
  • Merging
  • Conflicts
  • Tagging

Best Practices

Outline

  • Using Showlog
  • Commit Monitor
  • Branching Strategies
  • Merge In, Merge Out
  • Advanced Merging

Branching Strategies

  • Branch per feature

Branching Strategies

  • Branch per release

Branching Strategies

  • Branch per developer
  • Branch per team

Branching Strategies

  • Branch only when needed

Branching Strategies

Merge In, Merge Out

Branch

Summary

  • Using Showlog
  • Commit Monitor
  • Branching Strategies
  • Merge In, Merge Out
  • Advanced Merging

Questions !!

Questions