SlideShare a Scribd company logo
Version control
What?
Why?
How?
Lex Nederbragt, lex.nederbragt@ibv.uio.no
What is version control
Annotated log of changes
Backup system
Collaboration tool
For any file type, but text files work best
Code!
A definition
Version control
A tool for managing changes to a set of files
Each set of changes creates a new revision of the files
Allows users to recover old revisions reliably
Helps manage conflicting changes made by different users
From the Software Carpentry website
Use case I: reviewer #3
Paper submitted
After a couple of months Reviewer 3 writes:
“Please generate figure 3 with a higher resolution”
Use case I: reviewer #3
Your reply to the reviewer
We have continued to work on the code that
had generated the figures for the original
paper, and couldn’t recreate the exact code used
Our new code generates a graph which slightly
alters the interpretation
Use case I: reviewer #3
How would version control have helped?
‘Turn back the clock’ to the code used
Rerun analysis
Recreate exact figure
Use case II
Use case II
From my own work:
$ cd scripts
$ ls
blat_parse4.pl old_versions snps_flanks_2_fastq.pl
$ ls old_versions/
blat_parse2.pl blat_parse_attemp1.pl blat_parse.pl.bak
blat_parse.pl
blat_parse3_backup.pl
blat_parse3.pl
Use case II
How would version control have helped?
Older versions ‘hidden’ but still accessible
Annotated history of all changes available
Bonus:
Allows for safely trying out changes
Annotated log of changes
http://starlogs.net/#lexnederbragt/denovo-assembly-tutorial
Use case III: collaboration
Example: Wikipedia
http://en.wikipedia.org/wiki/Version_control
Fully traceable history of all contributions
Use case III: collaboration
Example: Google docs
Fully traceable history of all contributions
Use case IV: how you work
Using version control:
makes me change code in small steps
makes me log (annotate) my changes
makes me feel safe to change code
makes it easier to try out things
“But, this is way too complex!”
merge
tag
checkout
rebase
branch
pull request
conflict
https://www.atlassian.com/git/workflows
fetch
pull
push
diff log
status
“But, this is way too complex!”
Can keep it very simple
Just one piece of code, only you work on it
…
A few scripts in one folder, made available online
A large code base with multiple contributors
Private versus public
Local, private git repo
Shared, central, private git repo
Shared, public git repo
My advice
Try git
See
http://software-carpentry.org/v5/novice/git/

More Related Content

ODP
Why use version control software
PPT
Subversion for beginners brief Information
PDF
Git (Sistema Distribuido de Control de Versiones)
PPT
Introducción a Git
PDF
CakePHP 3.0 and beyond
PPTX
Coding & Best Practice in Programming in the NGS era
PPT
Introduction to Version Control and Configuration Management
PDF
Introduction to Subversion
Why use version control software
Subversion for beginners brief Information
Git (Sistema Distribuido de Control de Versiones)
Introducción a Git
CakePHP 3.0 and beyond
Coding & Best Practice in Programming in the NGS era
Introduction to Version Control and Configuration Management
Introduction to Subversion

Similar to Why of version control (20)

PDF
Version control with Subversion
PPTX
Version Control Training - First Lego League
PPT
FlashInTO SVN Presentation
PDF
How to use CVS applied to SOLab
PDF
git Versioning
PDF
IRJET-Evolution of Version Control Systems and a Study on Tortoisesvn
PPT
FTP Commando to Git Hero - WordCamp Denver 2013
ODP
Introduction to Version Control
PPT
Configuration Management
PPT
Totalsvn Usage And Administration By Gopi
PPT
Rails Rookies Bootcamp - Blogger
DOCX
Assessment item 1 File Systems and Advanced Scripting .docx
DOCX
CSE681 – Software Modeling and Analysis Fall 2013 Project .docx
PPT
Version Control
PPTX
Getting Started With Subversion
PPTX
version control system (2).pptx
PDF
Version Uncontrolled - How to Manage Your Version Control (whitepaper)
PDF
L06 a versioning_system_overview
PDF
Source code version control and git
PDF
We continue checking Microsoft projects: analysis of PowerShell
Version control with Subversion
Version Control Training - First Lego League
FlashInTO SVN Presentation
How to use CVS applied to SOLab
git Versioning
IRJET-Evolution of Version Control Systems and a Study on Tortoisesvn
FTP Commando to Git Hero - WordCamp Denver 2013
Introduction to Version Control
Configuration Management
Totalsvn Usage And Administration By Gopi
Rails Rookies Bootcamp - Blogger
Assessment item 1 File Systems and Advanced Scripting .docx
CSE681 – Software Modeling and Analysis Fall 2013 Project .docx
Version Control
Getting Started With Subversion
version control system (2).pptx
Version Uncontrolled - How to Manage Your Version Control (whitepaper)
L06 a versioning_system_overview
Source code version control and git
We continue checking Microsoft projects: analysis of PowerShell
Ad

More from Lex Nederbragt (12)

PPTX
Assembly: before and after
PPTX
Improving and validating the Atlantic Cod genome assembly using PacBio
PPTX
Repeat after me: Is our research reproducible (enough)?
PPTX
A different kettle of fish entirely: bioinformatic challenges and solutions f...
PPTX
Combining PacBio with short read technology for improved de novo genome assembly
PPTX
Updated: New High Throughput Sequencing technologies at the Norwegian Sequenc...
PPTX
New High Throughput Sequencing technologies at the Norwegian Sequencing Centr...
PPTX
How and why I use blogging
PPTX
How to sequence a large eukaryotic genome
PPTX
Assembly of metagenomes
PPTX
NGS techniques and data
PPTX
NGS: bioinformatic challenges
Assembly: before and after
Improving and validating the Atlantic Cod genome assembly using PacBio
Repeat after me: Is our research reproducible (enough)?
A different kettle of fish entirely: bioinformatic challenges and solutions f...
Combining PacBio with short read technology for improved de novo genome assembly
Updated: New High Throughput Sequencing technologies at the Norwegian Sequenc...
New High Throughput Sequencing technologies at the Norwegian Sequencing Centr...
How and why I use blogging
How to sequence a large eukaryotic genome
Assembly of metagenomes
NGS techniques and data
NGS: bioinformatic challenges
Ad

Recently uploaded (20)

PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PPTX
Computer Software and OS of computer science of grade 11.pptx
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PPTX
L1 - Introduction to python Backend.pptx
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
Digital Systems & Binary Numbers (comprehensive )
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
PTS Company Brochure 2025 (1).pdf.......
PPTX
ai tools demonstartion for schools and inter college
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
System and Network Administraation Chapter 3
PDF
Nekopoi APK 2025 free lastest update
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PPT
Introduction Database Management System for Course Database
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PPTX
Transform Your Business with a Software ERP System
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
VVF-Customer-Presentation2025-Ver1.9.pptx
Computer Software and OS of computer science of grade 11.pptx
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
L1 - Introduction to python Backend.pptx
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Digital Systems & Binary Numbers (comprehensive )
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
How to Choose the Right IT Partner for Your Business in Malaysia
PTS Company Brochure 2025 (1).pdf.......
ai tools demonstartion for schools and inter college
Which alternative to Crystal Reports is best for small or large businesses.pdf
System and Network Administraation Chapter 3
Nekopoi APK 2025 free lastest update
Upgrade and Innovation Strategies for SAP ERP Customers
Wondershare Filmora 15 Crack With Activation Key [2025
Introduction Database Management System for Course Database
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Navsoft: AI-Powered Business Solutions & Custom Software Development
Transform Your Business with a Software ERP System
wealthsignaloriginal-com-DS-text-... (1).pdf

Why of version control

  • 2. What is version control Annotated log of changes Backup system Collaboration tool For any file type, but text files work best Code!
  • 3. A definition Version control A tool for managing changes to a set of files Each set of changes creates a new revision of the files Allows users to recover old revisions reliably Helps manage conflicting changes made by different users From the Software Carpentry website
  • 4. Use case I: reviewer #3 Paper submitted After a couple of months Reviewer 3 writes: “Please generate figure 3 with a higher resolution”
  • 5. Use case I: reviewer #3 Your reply to the reviewer We have continued to work on the code that had generated the figures for the original paper, and couldn’t recreate the exact code used Our new code generates a graph which slightly alters the interpretation
  • 6. Use case I: reviewer #3 How would version control have helped? ‘Turn back the clock’ to the code used Rerun analysis Recreate exact figure
  • 8. Use case II From my own work: $ cd scripts $ ls blat_parse4.pl old_versions snps_flanks_2_fastq.pl $ ls old_versions/ blat_parse2.pl blat_parse_attemp1.pl blat_parse.pl.bak blat_parse.pl blat_parse3_backup.pl blat_parse3.pl
  • 9. Use case II How would version control have helped? Older versions ‘hidden’ but still accessible Annotated history of all changes available Bonus: Allows for safely trying out changes
  • 10. Annotated log of changes http://starlogs.net/#lexnederbragt/denovo-assembly-tutorial
  • 11. Use case III: collaboration Example: Wikipedia http://en.wikipedia.org/wiki/Version_control Fully traceable history of all contributions
  • 12. Use case III: collaboration Example: Google docs Fully traceable history of all contributions
  • 13. Use case IV: how you work Using version control: makes me change code in small steps makes me log (annotate) my changes makes me feel safe to change code makes it easier to try out things
  • 14. “But, this is way too complex!” merge tag checkout rebase branch pull request conflict https://www.atlassian.com/git/workflows fetch pull push diff log status
  • 15. “But, this is way too complex!” Can keep it very simple Just one piece of code, only you work on it … A few scripts in one folder, made available online A large code base with multiple contributors
  • 16. Private versus public Local, private git repo Shared, central, private git repo Shared, public git repo

Editor's Notes

  • #17: Examples:https://github.com/lexnederbragt/sequencetoolshttps://github.com/swcarpentry/bc