Revision Control (short version)
Andrew Haydn Grant Technical Director MIT Game Lab September 10, 2014
1Fall 2014 CMS.611J/6.073
TLAs ● RCS - Revision Control System
o aka Source Control Management (SCM) o aka Source Control o aka Version Control
● cvs - Concurrent Versions System ● svn - Subversion ● p4v - Perforce ● git - Git ● hg - Mercurial
2Fall 2014 CMS.611J/6.073
What is Revision Control?
● You copy files from a central server ● You make changes to your local files ● You copy files to the central server
Server (repository)
You (workspace)
3Fall 2014 CMS.611J/6.073
What is Revision Control?
● You copy files from a central server ● You make changes to your local files ● You copy files to the central server
Server
You Teammate
4Fall 2014 CMS.611J/6.073
What is Revision Control?
● You copy files from a central server ● You make changes to your local files ● You copy files to the central server
Server
You Teammate
Teammate Teammate
5Fall 2014 CMS.611J/6.073
What is Revision Control?
Authoritative Server
You Teammate
Teammate Teammate
Teammate
Teammate
Teammate
6Fall 2014 CMS.611J/6.073
What is Revision Control?
● A backup system ● A way to share code ● A history of your project ● An undo button ● A way to simultaneously edit the same files
7Fall 2014 CMS.611J/6.073
Operations
● Copy from server ● Submit changes to server ● Check status of local files ● Lock files so no one else can change them ● Compare different versions of the same file ● Merge changes by two different people
8Fall 2014 CMS.611J/6.073
Operations
● Copy from server
o aka get update pull checkout revert (down) ● Copy changes to server ● Check status of local files ● Lock files so no one else can change them ● Compare different versions of the same file ● Merge changes by two different people
9Fall 2014 CMS.611J/6.073
Operations
● Copy from server ● Copy changes to server
o aka submit commit put push checkin (up) ● Check status of local files ● Lock files so no one else can change them ● Compare different versions of the same file ● Merge changes by two different people
10Fall 2014 CMS.611J/6.073
Operations ● Copy from server ● Copy changes to server ● Check status of local files
o aka status ● Lock files so no one else can change them ● Compare different versions of the same file ● Merge changes by two different people
11Fall 2014 CMS.611J/6.073
Operations ● Copy from server ● Copy changes to server ● Check status of local files ● Lock files so no one else can change them
o aka lock ● Compare different versions of the same file ● Merge changes by two different people
12Fall 2014 CMS.611J/6.073
Operations ● Copy from server ● Copy changes to server ● Check status of local files ● Lock files so no one else can change them ● Compare different versions of the same file
o aka diff ● Merge changes by two different people
13Fall 2014 CMS.611J/6.073
Operations ● Copy from server ● Copy changes to server ● Check status of local files ● Lock files so no one else can change them ● Compare different versions of the same file ● Merge changes by two different people
o merge and then resolve
14Fall 2014 CMS.611J/6.073
Remember this? p4v, svn
Authoritative Server
You
Teammate Teammate
Teammate
Teammate
Teammate
Teammate
15Fall 2014 CMS.611J/6.073
Distributed Source Control git, hg Not Really
Authoritative Server
You
Teammate Teammate
Teammate
Teammate
Teammate
Teammate
16Fall 2014 CMS.611J/6.073
Don’t Break The Build!!! ● The version of the project in your
authoritative server should always build and run.
● With 0 errors. ● And 0 warnings. ● Use a check build
17Fall 2014 CMS.611J/6.073
Tips ● ignore unneeded files
o don’t submit object files! ● lock binary files
18Fall 2014 CMS.611J/6.073
Revision Control
Andrew Haydn Grant Technical Director MIT Game Lab September 10, 2014
19Fall 2014 CMS.611J/6.073
MIT OpenCourseWarehttp://ocw.mit.edu
CMS.611J / 6.073 Creating Video GamesFall 2014
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.