20
Revision Control (short version) Andrew Haydn Grant Technical Director MIT Game Lab September 10, 2014 1 Fall 2014 CMS.611J/6.073

Class on Creating Video Games, Lecture 3, Version Control · 2020-05-19 · TLAs RCS - Revision Control System o aka Source Control Management (SCM) . o aka Source Control o aka Version

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Class on Creating Video Games, Lecture 3, Version Control · 2020-05-19 · TLAs RCS - Revision Control System o aka Source Control Management (SCM) . o aka Source Control o aka Version

Revision Control (short version)

Andrew Haydn Grant Technical Director MIT Game Lab September 10, 2014

1Fall 2014 CMS.611J/6.073

Page 2: Class on Creating Video Games, Lecture 3, Version Control · 2020-05-19 · TLAs RCS - Revision Control System o aka Source Control Management (SCM) . o aka Source Control o aka Version

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

Page 3: Class on Creating Video Games, Lecture 3, Version Control · 2020-05-19 · TLAs RCS - Revision Control System o aka Source Control Management (SCM) . o aka Source Control o aka Version

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

Page 4: Class on Creating Video Games, Lecture 3, Version Control · 2020-05-19 · TLAs RCS - Revision Control System o aka Source Control Management (SCM) . o aka Source Control o aka Version

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

Page 5: Class on Creating Video Games, Lecture 3, Version Control · 2020-05-19 · TLAs RCS - Revision Control System o aka Source Control Management (SCM) . o aka Source Control o aka Version

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

Page 6: Class on Creating Video Games, Lecture 3, Version Control · 2020-05-19 · TLAs RCS - Revision Control System o aka Source Control Management (SCM) . o aka Source Control o aka Version

What is Revision Control?

Authoritative Server

You Teammate

Teammate Teammate

Teammate

Teammate

Teammate

6Fall 2014 CMS.611J/6.073

Page 7: Class on Creating Video Games, Lecture 3, Version Control · 2020-05-19 · TLAs RCS - Revision Control System o aka Source Control Management (SCM) . o aka Source Control o aka Version

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

Page 8: Class on Creating Video Games, Lecture 3, Version Control · 2020-05-19 · TLAs RCS - Revision Control System o aka Source Control Management (SCM) . o aka Source Control o aka Version

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

Page 9: Class on Creating Video Games, Lecture 3, Version Control · 2020-05-19 · TLAs RCS - Revision Control System o aka Source Control Management (SCM) . o aka Source Control o aka Version

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

Page 10: Class on Creating Video Games, Lecture 3, Version Control · 2020-05-19 · TLAs RCS - Revision Control System o aka Source Control Management (SCM) . o aka Source Control o aka Version

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

Page 11: Class on Creating Video Games, Lecture 3, Version Control · 2020-05-19 · TLAs RCS - Revision Control System o aka Source Control Management (SCM) . o aka Source Control o aka Version

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

Page 12: Class on Creating Video Games, Lecture 3, Version Control · 2020-05-19 · TLAs RCS - Revision Control System o aka Source Control Management (SCM) . o aka Source Control o aka Version

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

Page 13: Class on Creating Video Games, Lecture 3, Version Control · 2020-05-19 · TLAs RCS - Revision Control System o aka Source Control Management (SCM) . o aka Source Control o aka Version

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

Page 14: Class on Creating Video Games, Lecture 3, Version Control · 2020-05-19 · TLAs RCS - Revision Control System o aka Source Control Management (SCM) . o aka Source Control o aka Version

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

Page 15: Class on Creating Video Games, Lecture 3, Version Control · 2020-05-19 · TLAs RCS - Revision Control System o aka Source Control Management (SCM) . o aka Source Control o aka Version

Remember this? p4v, svn

Authoritative Server

You

Teammate Teammate

Teammate

Teammate

Teammate

Teammate

15Fall 2014 CMS.611J/6.073

Page 16: Class on Creating Video Games, Lecture 3, Version Control · 2020-05-19 · TLAs RCS - Revision Control System o aka Source Control Management (SCM) . o aka Source Control o aka Version

Distributed Source Control git, hg Not Really

Authoritative Server

You

Teammate Teammate

Teammate

Teammate

Teammate

Teammate

16Fall 2014 CMS.611J/6.073

Page 17: Class on Creating Video Games, Lecture 3, Version Control · 2020-05-19 · TLAs RCS - Revision Control System o aka Source Control Management (SCM) . o aka Source Control o aka Version

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

Page 18: Class on Creating Video Games, Lecture 3, Version Control · 2020-05-19 · TLAs RCS - Revision Control System o aka Source Control Management (SCM) . o aka Source Control o aka Version

Tips ● ignore unneeded files

o don’t submit object files! ● lock binary files

18Fall 2014 CMS.611J/6.073

Page 19: Class on Creating Video Games, Lecture 3, Version Control · 2020-05-19 · TLAs RCS - Revision Control System o aka Source Control Management (SCM) . o aka Source Control o aka Version

Revision Control

Andrew Haydn Grant Technical Director MIT Game Lab September 10, 2014

19Fall 2014 CMS.611J/6.073

Page 20: Class on Creating Video Games, Lecture 3, Version Control · 2020-05-19 · TLAs RCS - Revision Control System o aka Source Control Management (SCM) . o aka Source Control o aka Version

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.