Git Demo

What is a version control system?

  • Version control is a piece of software which allows you to record and preserve the history of changes made to directories and files.
  • If you mess things up, you can retrieve an earlier version of your project.

Have you been here before?

  • Save a copy elsewhere?
  • Save with a different name?
  • How do you name different versions?
  • What's different between them?
  • Many copies of nearly-identical but critically different files

Storing versions without VCS

Why use version control?

To store versions properly

  • VCS treats files as one project - one current version on disk, previous versions and variations saved in the repository
  • VCS starts with a base version of the project, and only saves the subsequent changes you make
  • In order to save a new revision, a commit message is required, which explains why the changes were made

Changes are saved sequentially

Different versions can be saved

Multiple versions can be merged

  • Restore previous versions
  • Understand what happened
  • Backup
  • Collaboration

Why use version control?

  • Track changes to MATLAB files for converting units
  • Show history of project
  • Show differences between versions
  • Work on different versions in branches
  • Local repo and remote repo

 

Demo overview

Caveat

  • This is a demo, not a tutorial
  • Objective is to appreciate the utility of version control

The staging area

Branches

Made with Slides.com