2/13/2019
1
Version Control
CS440
–
Introduction to Software Engineering
John Bell
Based on slides prepared by Jason Leigh for CS 340
University of Illinois at Chicago
Version Control
•
Incredibly important when working in teams, or
whenever multiple versions of a project need to
be retained, recovered, and generally managed.
•
Many tools for this: Revision Control System
(RCS), Subversion (SVN), CVS,
GIT
etc.
–
“Version Control with Git”,
Loeliger & McCullough,
O’Reilly, 2
nd
Edition, 2012.
–
n_control_software
–
Pro Git online book:
–
All CS 440 project teams will use git from a CS server:
marvin.cs.uic.edu

2/13/2019
2
How Previous Version Control Systems
Worked
•
E.g. SVN, Perforce, CVS
•
Create a central repository for holding code.
•
Upload initial codes to repository.
•
Checkout
codes to either read or modify.
•
Edit codes.
•
Commit edits to the repository. ( Check in )
•
Multiple users can checkout codes for reading,
but only one at a time can checkout for editing.
How Git Works
•
Git is a distributed system.
When you work on code as part of
a group, you CLONE a remote repository.
•
Git can also be used as a local repository system, for a single
developer to archive multiple versions of a project.
•
When you commit your changes you do not need to be
networked to the repository server. You can push your
updates later.
I.e. you work with your local repository.
•
Git has the notion of staging areas that are used to mark files
that will get committed.
This is really just the list of files that
are monitored by git as part of a project.
•
If you modify a file but do not stage it, it will not get
committed.
I.e. not all files in working directory are in git
•
Git makes it very easy to create and switch code branches so
you experiment with code ideas without damaging the main
branch.

2/13/2019
3
git commit
git add
.
