Version Control

Version Control (With Git)

The material in these slides was sourced from:

First… Archiving?

What are some ways you’ve used to keep / save different versions of files?

What are some drawbacks of these methods of saving versions of files?

Sharing / Collaborating

Have you ever worked on a programming project with more than one person? How did you share your code?

What are some issues with these methods (except (mostly) for dropbox)?

Enter: Version Control

What’s Version Control?

Version control software allows you to record changes to a file or set of files over time so that you can inspect or even revert to specific versions.

So… Why?

Version control can help us:

We’re Using Git!

A Bit About Git

It was developed by Linus Torvalds… who?

Linux

(the guy who made Linux)

By the way, does the name, Git, sound familiar? Where have seen it before?

Github vs Git

GIT AND GITHUB ARE DIFFERENT!

Who Uses Git and Github?

Git is used to maintain a variety of projects, like:

Some people use github to distribute open source code… for example:

Local Version Control

See the diagram on pro git

Centralized Version Control

See the diagram on pro git

Distributed Version Control

See the diagram on pro git

We’re Using Git, a Distributed Version Control System

Some Terminology

repository - the place where your version control system stores the snapshots that you save

Some More Terminology

What’s a remote repository again?

A copy of versions of your files on another computer.

Where Are My Files

In your local repository, git stores your files and versions of your files in a few different conceptual places:

Another Way to Look at It

And, More Terminology.

Two Basic Workflows

  1. Creating and setting up local and remote repositories
  2. Making, saving, and sharing changes

Creating Repositories

Making, Saving, and Sharing Changes

Ok. Great!

Remind me again, what’s github?

We can now submit assignments using the commandline

Submitting Assignments

Let’s Start Off With Creating Repositories