Revision Control (short version) Andrew Haydn Grant Technical Director MIT Game Lab September 10, 2014 Fall 2014 CMS.611J/6.073 1
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 Fall 2014 CMS.611J/6.073 2
What is Revision Control? Server (repository) You (workspace) ● You copy files from a central server ● You make changes to your local files ● You copy files to the central server Fall 2014 CMS.611J/6.073 3
What is Revision Control? Server Teammate You ● You copy files from a central server ● You make changes to your local files ● You copy files to the central server Fall 2014 CMS.611J/6.073 4
What is Revision Control? Server Teammate Teammate Teammate You ● You copy files from a central server ● You make changes to your local files ● You copy files to the central server Fall 2014 CMS.611J/6.073 5
What is Revision Control? Teammate Teammate Teammate Authoritative Teammate Server Teammate Teammate You Fall 2014 CMS.611J/6.073 6
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 Fall 2014 CMS.611J/6.073 7
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 Fall 2014 CMS.611J/6.073 8
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 Fall 2014 CMS.611J/6.073 9
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 Fall 2014 CMS.611J/6.073 10
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 Fall 2014 CMS.611J/6.073 11
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 Fall 2014 CMS.611J/6.073 12
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 Fall 2014 CMS.611J/6.073 13
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 Fall 2014 CMS.611J/6.073 14
Remember this? p4v, svn Teammate Teammate Teammate Authoritative Teammate Server Teammate Teammate You Fall 2014 CMS.611J/6.073 15
Distributed Source Control git, hg Teammate Teammate Teammate Not Really Authoritative Teammate Teammate Server Teammate You Fall 2014 CMS.611J/6.073 16
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 Fall 2014 CMS.611J/6.073 17
Tips ● ignore unneeded files o don’t submit object files! ● lock binary files Fall 2014 CMS.611J/6.073 18
Revision Control Andrew Haydn Grant Technical Director MIT Game Lab September 10, 2014 Fall 2014 CMS.611J/6.073 19
MIT OpenCourseWare http://ocw.mit.edu CMS.611 J / 6.073 Creating Video Games Fall 2014 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
Recommend
More recommend