SlideShare a Scribd company logo
1 of 21
Download to read offline
Introduction to Version Control
Wei-Tsung Su (蘇維宗)
ellington.su@gmail.com
04/01/2014 (Ver. 1.0)
Ubiquitous Computing and Ambient Networking Laboratory Page : 1
Reference
• Scott Chacon, Git Pro, Jul. 29, 2009. Available:
http://git-scm.com/book
• http://en.wikipedia.org/wiki/Revision_control
• http://homes.cs.washington.edu/~mernst/advic
e/version-control.html
Ubiquitous Computing and Ambient Networking Laboratory Page : 2
Agenda
• What is version control?
• Why use version control?
• Version control system (VCS)
– Types of VCS
– Terminologies of VCS
– Challenges of VCS
• Free VCS
– Web-based services
– Open source projects
Ubiquitous Computing and Ambient Networking Laboratory Page : 3
Version Control (or Revision Control)
• Version control is the management of changes to
documents, computer programs, large web sites,
and other collections of information. (Source:
Wikipedia)
• In version control, changes are usually identified
by a number termed as ”revision number”.
Ubiquitous Computing and Ambient Networking Laboratory Page : 4
Why use Version Control?
• Recall the previous versions
• Collaborative development environment
• Difference releases for a product by
– Different platforms
– Different customers
– …
Ubiquitous Computing and Ambient Networking Laboratory Page : 5
Scenarios
• Sometimes, it happens …
Ubiquitous Computing and Ambient Networking Laboratory Page : 6
Scenarioscon’t
• Chicken and duck talk …
Ubiquitous Computing and Ambient Networking Laboratory Page : 7
void LOOPv1() {
for(;;);
}
Remove the for loop!
int LOOPv2() {
while(true);
}
for loop???
Scenarioscon’t
• Customers want customization …
Ubiquitous Computing and Ambient Networking Laboratory Page : 8
Ver 1.0 Ver 1.1_A
Ver 1.2_B
Ver 1.3_A
Customer A
Customer B
Version Control System
• Version control system (VCS) is a system that records
changes to a file or set of files over time so that you can
recall specific versions later. (Source: Git Pro)
• Type of VCS
– Local VCS (Ex. rcs)
– Centralized VCS (Ex. CVS, SVN)
– Distributed VCS (Ex. Git)
Ubiquitous Computing and Ambient Networking Laboratory Page : 9
Local VCS
Ubiquitous Computing and Ambient Networking Laboratory Page : 10
Local Computer
Version 3
Workspace Repository
Version 3
Version 2
Version 1
Centralized VCS
Ubiquitous Computing and Ambient Networking Laboratory Page : 11
VCS Server
Version 3
Workspace Repository
Version 3
Version 2
Version 1
Local Computer A
Version 3
Workspace
Local Computer B
Distributed VCS
Ubiquitous Computing and Ambient Networking Laboratory Page : 12
VCS Server
Repository
Version 3
Version 2
Version 1
Local Computer A
Repository
Version 3
Version 2
Version 1
Workspace
Version 3
Local Computer B
Repository
Version 3
Version 2
Version 1
Workspace
Version 3
Concepts of VCS
• Workspace and Repository
• Commit and Update
• Branch and Merge
Ubiquitous Computing and Ambient Networking Laboratory Page : 13
Workspace and Repository
• Workspace
– The working copy which developers could maintain in local
machines.
• Repository
– The controlled copies of different versions in VCS.
Ubiquitous Computing and Ambient Networking Laboratory Page : 14
VCS Server
Version 3
Workspace Repository
Version 3
Version 2
Version 1
Local Computer A
Version 3
Workspace
Local Computer B
Commit and Update
• Commit
– Write the changes made in the working copy back to the repository.
• Update
– Update changes made in the repository into the local working copy.
Ubiquitous Computing and Ambient Networking Laboratory Page : 15
Version 3 (modified)
Workspace Repository
Version 3
Version 2
Version 1
Version 41. Commit
Version 4
Workspace
2. Update
Branch and Merge
• Branch
– A set of files may be branched at a point in time so that, from that
time forward, two copies of those files may develop at different
speeds or in different ways independently of each other.
• Merge
– An operation in which two sets of changes are applied to a file or
set of files.
Ubiquitous Computing and Ambient Networking Laboratory Page : 16
Repository
Version 3Version 2Version 1
Version 4
MergeBranch
Version 5
Challenges of VCS
• Conflict
– A conflict occurs when different parties make changes to
the same document, and the system is unable to
reconcile the changes.
Ubiquitous Computing and Ambient Networking Laboratory Page : 17
Version 3 (modified)
Workspace Repository
Version 3
Version 2
Version 1
Version 4
(Conflict!!!)
Commit
Version 3 (modified)
Workspace
Commit
How to Prevent Conflicts?
• Modularize your projects
• Don’t commit generated files
• Integrate others’ changes frequently
• Share your changes frequently
• Test before commit
• …
Ubiquitous Computing and Ambient Networking Laboratory Page : 18
Web-based VCS
• GitHub
– https://github.com/
• OpenFoundry
– https://www.openfoundry.org/of/
• SourceForge
– http://sourceforge.net/
• Google Code Project Hosting
– https://code.google.com/
Ubiquitous Computing and Ambient Networking Laboratory Page : 19
Open Source Projects
• Concurrent Versions System (CVS)
• Subversion (SVN)
– Apache Subversion Server
– VisualSVN Server
– TortoiseSVN Client
– …
• git-scm (software configuration management)
Ubiquitous Computing and Ambient Networking Laboratory Page : 20
Q & A
Ubiquitous Computing and Ambient Networking Laboratory Page : 21

More Related Content

What's hot

Dealing with large code bases. cd ams meetup
Dealing with large code bases. cd ams meetupDealing with large code bases. cd ams meetup
Dealing with large code bases. cd ams meetupViktor Sadovnikov
 
Kernel Recipes 2016 - The kernel report
Kernel Recipes 2016 - The kernel reportKernel Recipes 2016 - The kernel report
Kernel Recipes 2016 - The kernel reportAnne Nicolas
 
Alternatives to layer-based image distribution: using CERN filesystem for images
Alternatives to layer-based image distribution: using CERN filesystem for imagesAlternatives to layer-based image distribution: using CERN filesystem for images
Alternatives to layer-based image distribution: using CERN filesystem for imagesGeorge Lestaris
 
Hands on kubernetes_container_orchestration
Hands on kubernetes_container_orchestrationHands on kubernetes_container_orchestration
Hands on kubernetes_container_orchestrationAmir Hossein Sorouri
 
Understanding GIT and Version Control
Understanding GIT and Version ControlUnderstanding GIT and Version Control
Understanding GIT and Version ControlSourabh Sahu
 
Automated testing with Openshift
Automated testing with OpenshiftAutomated testing with Openshift
Automated testing with OpenshiftOleg Popov
 
Principles of Reproducible Workflows (U-DAWS) nfcamp2019
Principles of Reproducible Workflows (U-DAWS) nfcamp2019Principles of Reproducible Workflows (U-DAWS) nfcamp2019
Principles of Reproducible Workflows (U-DAWS) nfcamp2019Venkat Malladi
 
Getting Started with Git: A Primer for SVN and TFS Users
Getting Started with Git: A Primer for SVN and TFS UsersGetting Started with Git: A Primer for SVN and TFS Users
Getting Started with Git: A Primer for SVN and TFS UsersNoam Kfir
 
Kernel Recipes 2016 - Patches carved into stone tablets...
Kernel Recipes 2016 - Patches carved into stone tablets...Kernel Recipes 2016 - Patches carved into stone tablets...
Kernel Recipes 2016 - Patches carved into stone tablets...Anne Nicolas
 
BePUG - PowerShell and REST - Expanding your Horizon
BePUG - PowerShell and REST - Expanding your HorizonBePUG - PowerShell and REST - Expanding your Horizon
BePUG - PowerShell and REST - Expanding your HorizonEurocontrol
 

What's hot (18)

Subversion last minute survival crash course
Subversion  last minute survival crash courseSubversion  last minute survival crash course
Subversion last minute survival crash course
 
Container Security
Container SecurityContainer Security
Container Security
 
Makefile+VersionControl
Makefile+VersionControlMakefile+VersionControl
Makefile+VersionControl
 
Vpm
VpmVpm
Vpm
 
Dealing with large code bases. cd ams meetup
Dealing with large code bases. cd ams meetupDealing with large code bases. cd ams meetup
Dealing with large code bases. cd ams meetup
 
Kernel Recipes 2016 - The kernel report
Kernel Recipes 2016 - The kernel reportKernel Recipes 2016 - The kernel report
Kernel Recipes 2016 - The kernel report
 
Linuxcon secureefficientcontainerimagemanagementharbor
Linuxcon secureefficientcontainerimagemanagementharborLinuxcon secureefficientcontainerimagemanagementharbor
Linuxcon secureefficientcontainerimagemanagementharbor
 
Alternatives to layer-based image distribution: using CERN filesystem for images
Alternatives to layer-based image distribution: using CERN filesystem for imagesAlternatives to layer-based image distribution: using CERN filesystem for images
Alternatives to layer-based image distribution: using CERN filesystem for images
 
pracfinal
pracfinalpracfinal
pracfinal
 
Hands on kubernetes_container_orchestration
Hands on kubernetes_container_orchestrationHands on kubernetes_container_orchestration
Hands on kubernetes_container_orchestration
 
Releasing a Distribution in the Age of DevOps.
Releasing a Distribution in the Age of DevOps. Releasing a Distribution in the Age of DevOps.
Releasing a Distribution in the Age of DevOps.
 
Understanding GIT and Version Control
Understanding GIT and Version ControlUnderstanding GIT and Version Control
Understanding GIT and Version Control
 
Automated testing with Openshift
Automated testing with OpenshiftAutomated testing with Openshift
Automated testing with Openshift
 
Principles of Reproducible Workflows (U-DAWS) nfcamp2019
Principles of Reproducible Workflows (U-DAWS) nfcamp2019Principles of Reproducible Workflows (U-DAWS) nfcamp2019
Principles of Reproducible Workflows (U-DAWS) nfcamp2019
 
Introduction to git
Introduction to gitIntroduction to git
Introduction to git
 
Getting Started with Git: A Primer for SVN and TFS Users
Getting Started with Git: A Primer for SVN and TFS UsersGetting Started with Git: A Primer for SVN and TFS Users
Getting Started with Git: A Primer for SVN and TFS Users
 
Kernel Recipes 2016 - Patches carved into stone tablets...
Kernel Recipes 2016 - Patches carved into stone tablets...Kernel Recipes 2016 - Patches carved into stone tablets...
Kernel Recipes 2016 - Patches carved into stone tablets...
 
BePUG - PowerShell and REST - Expanding your Horizon
BePUG - PowerShell and REST - Expanding your HorizonBePUG - PowerShell and REST - Expanding your Horizon
BePUG - PowerShell and REST - Expanding your Horizon
 

Viewers also liked

Google Glass - Unit01: Design
Google Glass - Unit01: DesignGoogle Glass - Unit01: Design
Google Glass - Unit01: DesignWei-Tsung Su
 
Introduction to OAuth
Introduction to OAuthIntroduction to OAuth
Introduction to OAuthWei-Tsung Su
 
軟體系統測試簡介
軟體系統測試簡介軟體系統測試簡介
軟體系統測試簡介Wei-Tsung Su
 
Arduino Yun Mini - 使用SQLite
Arduino Yun Mini - 使用SQLiteArduino Yun Mini - 使用SQLite
Arduino Yun Mini - 使用SQLiteWei-Tsung Su
 
Arduino Yun Mini簡介
Arduino Yun Mini簡介Arduino Yun Mini簡介
Arduino Yun Mini簡介Wei-Tsung Su
 
Google App Engine for Python - Unit01: Basic
Google App Engine for Python - Unit01: BasicGoogle App Engine for Python - Unit01: Basic
Google App Engine for Python - Unit01: BasicWei-Tsung Su
 
LinkIt Smart 7688程式開發
LinkIt Smart 7688程式開發LinkIt Smart 7688程式開發
LinkIt Smart 7688程式開發Wei-Tsung Su
 
MQTT簡介與使用開放原始碼
MQTT簡介與使用開放原始碼MQTT簡介與使用開放原始碼
MQTT簡介與使用開放原始碼Wei-Tsung Su
 
Introduction to Wi-Fi Direct
Introduction to Wi-Fi DirectIntroduction to Wi-Fi Direct
Introduction to Wi-Fi DirectWei-Tsung Su
 
Introducing MQTT
Introducing MQTTIntroducing MQTT
Introducing MQTTAndy Piper
 
Introduction to NFC
Introduction to NFCIntroduction to NFC
Introduction to NFCWei-Tsung Su
 

Viewers also liked (12)

創業的藝術
創業的藝術創業的藝術
創業的藝術
 
Google Glass - Unit01: Design
Google Glass - Unit01: DesignGoogle Glass - Unit01: Design
Google Glass - Unit01: Design
 
Introduction to OAuth
Introduction to OAuthIntroduction to OAuth
Introduction to OAuth
 
軟體系統測試簡介
軟體系統測試簡介軟體系統測試簡介
軟體系統測試簡介
 
Arduino Yun Mini - 使用SQLite
Arduino Yun Mini - 使用SQLiteArduino Yun Mini - 使用SQLite
Arduino Yun Mini - 使用SQLite
 
Arduino Yun Mini簡介
Arduino Yun Mini簡介Arduino Yun Mini簡介
Arduino Yun Mini簡介
 
Google App Engine for Python - Unit01: Basic
Google App Engine for Python - Unit01: BasicGoogle App Engine for Python - Unit01: Basic
Google App Engine for Python - Unit01: Basic
 
LinkIt Smart 7688程式開發
LinkIt Smart 7688程式開發LinkIt Smart 7688程式開發
LinkIt Smart 7688程式開發
 
MQTT簡介與使用開放原始碼
MQTT簡介與使用開放原始碼MQTT簡介與使用開放原始碼
MQTT簡介與使用開放原始碼
 
Introduction to Wi-Fi Direct
Introduction to Wi-Fi DirectIntroduction to Wi-Fi Direct
Introduction to Wi-Fi Direct
 
Introducing MQTT
Introducing MQTTIntroducing MQTT
Introducing MQTT
 
Introduction to NFC
Introduction to NFCIntroduction to NFC
Introduction to NFC
 

Similar to Introduction to Version Control

Version Control With Subversion
Version Control With SubversionVersion Control With Subversion
Version Control With SubversionSamnang Chhun
 
L06 a versioning_system_overview
L06 a versioning_system_overviewL06 a versioning_system_overview
L06 a versioning_system_overviewM. Shahzad Mughal
 
Linux13 concurrent versions system
Linux13 concurrent versions systemLinux13 concurrent versions system
Linux13 concurrent versions systemJainul Musani
 
Introduction to Version Control and Configuration Management
Introduction to Version Control and Configuration ManagementIntroduction to Version Control and Configuration Management
Introduction to Version Control and Configuration ManagementPhilip Johnson
 
SVN Tool Information : Best Practices
SVN Tool Information  : Best PracticesSVN Tool Information  : Best Practices
SVN Tool Information : Best PracticesMaidul Islam
 
Digital Fabrication Studio 0.3 Information
Digital Fabrication Studio 0.3 InformationDigital Fabrication Studio 0.3 Information
Digital Fabrication Studio 0.3 InformationMassimo Menichinelli
 
IRJET-Evolution of Version Control Systems and a Study on Tortoisesvn
IRJET-Evolution of Version Control Systems and a Study on TortoisesvnIRJET-Evolution of Version Control Systems and a Study on Tortoisesvn
IRJET-Evolution of Version Control Systems and a Study on TortoisesvnIRJET Journal
 
Digital Fabrication Studio.02 _Information @ Aalto Media Factory
Digital Fabrication Studio.02 _Information @ Aalto Media FactoryDigital Fabrication Studio.02 _Information @ Aalto Media Factory
Digital Fabrication Studio.02 _Information @ Aalto Media FactoryMassimo Menichinelli
 
Digital Fabrication Studio v.0.2: Information
Digital Fabrication Studio v.0.2: InformationDigital Fabrication Studio v.0.2: Information
Digital Fabrication Studio v.0.2: InformationMassimo Menichinelli
 
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
 
Introduction to Subversion
Introduction to SubversionIntroduction to Subversion
Introduction to SubversionAtul Jha
 
Distributed Version Control Systems
Distributed Version Control SystemsDistributed Version Control Systems
Distributed Version Control SystemsMihail Stoynov
 
Source-it Version-contol & GIT - floating-lesson
Source-it Version-contol & GIT - floating-lessonSource-it Version-contol & GIT - floating-lesson
Source-it Version-contol & GIT - floating-lessonYoram Michaeli
 

Similar to Introduction to Version Control (20)

Version Control With Subversion
Version Control With SubversionVersion Control With Subversion
Version Control With Subversion
 
L06 a versioning_system_overview
L06 a versioning_system_overviewL06 a versioning_system_overview
L06 a versioning_system_overview
 
Linux13 concurrent versions system
Linux13 concurrent versions systemLinux13 concurrent versions system
Linux13 concurrent versions system
 
Introduction to Version Control and Configuration Management
Introduction to Version Control and Configuration ManagementIntroduction to Version Control and Configuration Management
Introduction to Version Control and Configuration Management
 
SVN Tool Information : Best Practices
SVN Tool Information  : Best PracticesSVN Tool Information  : Best Practices
SVN Tool Information : Best Practices
 
Digital Fabrication Studio 0.3 Information
Digital Fabrication Studio 0.3 InformationDigital Fabrication Studio 0.3 Information
Digital Fabrication Studio 0.3 Information
 
Cvs
CvsCvs
Cvs
 
IRJET-Evolution of Version Control Systems and a Study on Tortoisesvn
IRJET-Evolution of Version Control Systems and a Study on TortoisesvnIRJET-Evolution of Version Control Systems and a Study on Tortoisesvn
IRJET-Evolution of Version Control Systems and a Study on Tortoisesvn
 
Version Control
Version ControlVersion Control
Version Control
 
SVN Information
SVN Information  SVN Information
SVN Information
 
Digital Fabrication Studio.02 _Information @ Aalto Media Factory
Digital Fabrication Studio.02 _Information @ Aalto Media FactoryDigital Fabrication Studio.02 _Information @ Aalto Media Factory
Digital Fabrication Studio.02 _Information @ Aalto Media Factory
 
Source control
Source controlSource control
Source control
 
Digital Fabrication Studio v.0.2: Information
Digital Fabrication Studio v.0.2: InformationDigital Fabrication Studio v.0.2: Information
Digital Fabrication Studio v.0.2: Information
 
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
 
Evolution ofversioncontrolinopensource
Evolution ofversioncontrolinopensourceEvolution ofversioncontrolinopensource
Evolution ofversioncontrolinopensource
 
Introduction to Subversion
Introduction to SubversionIntroduction to Subversion
Introduction to Subversion
 
SVN
SVNSVN
SVN
 
Distributed Version Control Systems
Distributed Version Control SystemsDistributed Version Control Systems
Distributed Version Control Systems
 
Source-it Version-contol & GIT - floating-lesson
Source-it Version-contol & GIT - floating-lessonSource-it Version-contol & GIT - floating-lesson
Source-it Version-contol & GIT - floating-lesson
 
Evolution of version control in opensource - fossa2010
Evolution of version control in opensource - fossa2010Evolution of version control in opensource - fossa2010
Evolution of version control in opensource - fossa2010
 

Recently uploaded

Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfme23b1001
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
DATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage exampleDATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage examplePragyanshuParadkar1
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHC Sai Kiran
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .Satyam Kumar
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 

Recently uploaded (20)

Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdf
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
DATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage exampleDATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage example
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECH
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 

Introduction to Version Control

  • 1. Introduction to Version Control Wei-Tsung Su (蘇維宗) ellington.su@gmail.com 04/01/2014 (Ver. 1.0) Ubiquitous Computing and Ambient Networking Laboratory Page : 1
  • 2. Reference • Scott Chacon, Git Pro, Jul. 29, 2009. Available: http://git-scm.com/book • http://en.wikipedia.org/wiki/Revision_control • http://homes.cs.washington.edu/~mernst/advic e/version-control.html Ubiquitous Computing and Ambient Networking Laboratory Page : 2
  • 3. Agenda • What is version control? • Why use version control? • Version control system (VCS) – Types of VCS – Terminologies of VCS – Challenges of VCS • Free VCS – Web-based services – Open source projects Ubiquitous Computing and Ambient Networking Laboratory Page : 3
  • 4. Version Control (or Revision Control) • Version control is the management of changes to documents, computer programs, large web sites, and other collections of information. (Source: Wikipedia) • In version control, changes are usually identified by a number termed as ”revision number”. Ubiquitous Computing and Ambient Networking Laboratory Page : 4
  • 5. Why use Version Control? • Recall the previous versions • Collaborative development environment • Difference releases for a product by – Different platforms – Different customers – … Ubiquitous Computing and Ambient Networking Laboratory Page : 5
  • 6. Scenarios • Sometimes, it happens … Ubiquitous Computing and Ambient Networking Laboratory Page : 6
  • 7. Scenarioscon’t • Chicken and duck talk … Ubiquitous Computing and Ambient Networking Laboratory Page : 7 void LOOPv1() { for(;;); } Remove the for loop! int LOOPv2() { while(true); } for loop???
  • 8. Scenarioscon’t • Customers want customization … Ubiquitous Computing and Ambient Networking Laboratory Page : 8 Ver 1.0 Ver 1.1_A Ver 1.2_B Ver 1.3_A Customer A Customer B
  • 9. Version Control System • Version control system (VCS) is a system that records changes to a file or set of files over time so that you can recall specific versions later. (Source: Git Pro) • Type of VCS – Local VCS (Ex. rcs) – Centralized VCS (Ex. CVS, SVN) – Distributed VCS (Ex. Git) Ubiquitous Computing and Ambient Networking Laboratory Page : 9
  • 10. Local VCS Ubiquitous Computing and Ambient Networking Laboratory Page : 10 Local Computer Version 3 Workspace Repository Version 3 Version 2 Version 1
  • 11. Centralized VCS Ubiquitous Computing and Ambient Networking Laboratory Page : 11 VCS Server Version 3 Workspace Repository Version 3 Version 2 Version 1 Local Computer A Version 3 Workspace Local Computer B
  • 12. Distributed VCS Ubiquitous Computing and Ambient Networking Laboratory Page : 12 VCS Server Repository Version 3 Version 2 Version 1 Local Computer A Repository Version 3 Version 2 Version 1 Workspace Version 3 Local Computer B Repository Version 3 Version 2 Version 1 Workspace Version 3
  • 13. Concepts of VCS • Workspace and Repository • Commit and Update • Branch and Merge Ubiquitous Computing and Ambient Networking Laboratory Page : 13
  • 14. Workspace and Repository • Workspace – The working copy which developers could maintain in local machines. • Repository – The controlled copies of different versions in VCS. Ubiquitous Computing and Ambient Networking Laboratory Page : 14 VCS Server Version 3 Workspace Repository Version 3 Version 2 Version 1 Local Computer A Version 3 Workspace Local Computer B
  • 15. Commit and Update • Commit – Write the changes made in the working copy back to the repository. • Update – Update changes made in the repository into the local working copy. Ubiquitous Computing and Ambient Networking Laboratory Page : 15 Version 3 (modified) Workspace Repository Version 3 Version 2 Version 1 Version 41. Commit Version 4 Workspace 2. Update
  • 16. Branch and Merge • Branch – A set of files may be branched at a point in time so that, from that time forward, two copies of those files may develop at different speeds or in different ways independently of each other. • Merge – An operation in which two sets of changes are applied to a file or set of files. Ubiquitous Computing and Ambient Networking Laboratory Page : 16 Repository Version 3Version 2Version 1 Version 4 MergeBranch Version 5
  • 17. Challenges of VCS • Conflict – A conflict occurs when different parties make changes to the same document, and the system is unable to reconcile the changes. Ubiquitous Computing and Ambient Networking Laboratory Page : 17 Version 3 (modified) Workspace Repository Version 3 Version 2 Version 1 Version 4 (Conflict!!!) Commit Version 3 (modified) Workspace Commit
  • 18. How to Prevent Conflicts? • Modularize your projects • Don’t commit generated files • Integrate others’ changes frequently • Share your changes frequently • Test before commit • … Ubiquitous Computing and Ambient Networking Laboratory Page : 18
  • 19. Web-based VCS • GitHub – https://github.com/ • OpenFoundry – https://www.openfoundry.org/of/ • SourceForge – http://sourceforge.net/ • Google Code Project Hosting – https://code.google.com/ Ubiquitous Computing and Ambient Networking Laboratory Page : 19
  • 20. Open Source Projects • Concurrent Versions System (CVS) • Subversion (SVN) – Apache Subversion Server – VisualSVN Server – TortoiseSVN Client – … • git-scm (software configuration management) Ubiquitous Computing and Ambient Networking Laboratory Page : 20
  • 21. Q & A Ubiquitous Computing and Ambient Networking Laboratory Page : 21