Slide 1

Slide 1 text

Version Control Software and Source Code Repositories Levi D. Smith Knoxville Game Design January 2018

Slide 2

Slide 2 text

Overview • I don’t claim to be an expert, but know enough to do the basics • Software Configuration Management (SCM) • Version Control Systems • The tool used for managing source code • Distributed vs Centralized (client / server) • https://en.wikipedia.org/wiki/Comparison_of_version_control_software • Source Code Repositories • Where your code is hosted • Public and private • Paid and free • Can also host server yourself, remote file share, or just local system

Slide 3

Slide 3 text

Benefits • See diffs between revisions (deltas) • Roll back to a stable version • Timestamps of when commits were made • Accessibility to multiple developers • Better than sharing a Dropbox or Google drive folder • More elegant than backing up directories • Analysis tools and web view of source code

Slide 4

Slide 4 text

Disadvantages • All developers must have the tool and access to the repository • Developers resistant to using version control • Time investment for managing repository

Slide 5

Slide 5 text

General Workflow Create repository on server Clone repository to local workstation Edit code Commit changes Push changes to repository on server

Slide 6

Slide 6 text

Version Control Software

Slide 7

Slide 7 text

Older Version Control Systems • Source Code Control System (SCCS), 1972 • Concurrent Versions System (CVS), 1990 • Check-in and Check-out code • Can lock code that is checked out

Slide 8

Slide 8 text

Microsoft Version Control Systems • Visual Source Safe, 1994 • Required client licenses • Team Foundation Server (TFS) • Integrates well with Visual Studio

Slide 9

Slide 9 text

Subversion (SVN) • Created by CollabNet in 2000 • Now a part of the Apache Foundation project • https://subversion.apache.org/ • Command line interface • Tortoise is a graphical interface that integrates into operating system • Shows icons for new and updated files • Icons may be out of sync • Also has repo browser • Commit identifiers are sequential numbers • AnkhSVN • Support for Subversion in Visual Studio

Slide 10

Slide 10 text

Mecurial • Supported by Atlassian Source Tree graphical interface • BitBucket default • Command line interface and Tortoise support

Slide 11

Slide 11 text

Git • Originally developed by Linus Torvalds in 2005 • https://git-scm.com/ • Command line interface • Open Source graphical tool • Also supported by Atlassian Source Tree • Changes have to be “staged” before commit • Commit identifiers are cryptic strings • Can push local repository to server • Differences with SVN • https://help.github.com/articles/what-are-the-differences-between-subversion-and- git/

Slide 12

Slide 12 text

Ignore Files • Useful for excluding files to be committed • In Unity, don’t need to check in /Library, /Temp, and your builds • .gitignore (Git), .ignore.txt (Mecurial) • Can set global ignore file, so that same folders are ignored for every project • Can use regular expressions

Slide 13

Slide 13 text

Other topics • Merging • Always commit after a merge • Forking • Typically don’t do it • Rebase, Archive, Branch • Blame

Slide 14

Slide 14 text

Source Code Repositories

Slide 15

Slide 15 text

SourceForge • Older host popular for Open Source projects • Supports Subversion

Slide 16

Slide 16 text

BitBucket • Can host free private repositories • Supports Mecurial and Git • Repository size capped to 2GB

Slide 17

Slide 17 text

GitHub • Public repositories are free • Private repositories are $7 per month • Graphical charts showing checkins • Wiki, Issue (bug) tracking • Git ≠ GitHub