This document provides an overview of version control systems and how they can be used to track changes to code and documents. It discusses how version control allows users to keep track of changes like a lab notebook, roll back to previous versions, back up work, collaborate remotely, resolve conflicts, and work on files from multiple locations. It describes centralized and distributed version control systems as well as remote repositories. It focuses on explaining how to use the distributed version control system Git, including commits, checkouts, branching, merging, and working with remote repositories. It concludes with recommendations around workflows and best practices when using version control in collaborative projects.
1 of 12
Download to read offline
More Related Content
Software Carpentry - Version control slides
1. Version Control
Based on the materials by
Mike Jackson, Katy Huff, Paul Ivanov, Rachel Slaybaugh, Anthony
Scopatz, and Greg Wilson
Copyright 息 Software Carpentry 2013
This work is licensed under the Creative Commons Attribution License
See http://software-carpentry.org/license.html for more information.
2. With version control we can
Keep track of changes like a lab notebook for code
and documents
Roll back changes to any point in the history of
changes to our files
Back up our entire history of changes in various
locations
Work on our files from multiple locations
Identify and resolve conflicts when the same file is
edited within two repositories without losing any work
Collaboratively work on code or documents or any
other files
http://software-carpentry.org
3. Different version control systems
Centralized version control, for example SVN
Distributed version control, for example
Mercurial or Git
Remote repositories hosting services, for
example GitHub and BitBucket
Ask about a repository at your research
institution!
http://software-carpentry.org
10. Working with remote repository
Local
Working
copy
commit
checkout
My laptop
Remote
push
pull
GitHub
http://software-carpentry.org
11. Working with remote repository
Remote
pull
push
pull
Working
copy
commit
push
Working
copy
commit
checkout
checkout
Aleksandra
John
http://software-carpentry.org
12. Workflows and best practices
Thinking about joining and contributing to
project that uses a version control?
Check their workflow and recommended
practice (for example, each new feature in a
new branch).
If in doubt, ask questions!
http://software-carpentry.org