Sports Biomechanics Lab > Lab Meetings > Revision Control
Personal tools

Revision Control

Synopsis of revision control basics and Git.

Revision Control

Other names

  •  version control
  • source control
  • software configuration management

What is it?

A way to track changes to computer files, often with the capability of collaboration. It is used in software coding, word processors like google docs, wiki's, content management, CAD, etc. It is basically a more advanced "undo" button. Most often used with human readable files but can be used with other types too.

Distributed vs Client-Server models

Collaborative work on the same file. How can two people open the file at the same time and work on it? This capibily has only just been introduced: google docs, google wave, the upcoming gedit, etc. So how has it traditionally been handled?

Client server
All the files are stored on a central server and must be either checked out leaving the file locked to others or many people can check them out and the changes must be merged after the edits. Merging is difficult with files that aren't basic text.
Distributed
Everyone's copy is a repository that can be copied by others. No central server, so the operations on the files are much faster.

Resources

Open source

Proprietary

Git

Git was written to manage the Linux sourcecode after Bitkeeper wasn't available to use anymore.

Features (from Version Control with Git by Jon Leoliger)

  • Distributed development
  • For thousands of developers
  • Fast performance
  • Data integrity
  • Accountability
  • Immutability
  • Atomic transactions
  • Encourage branched development
  • Complete repositories
  • Clean internal design
  • Free, as in freedom

Resources

Tutorial

  • Concepts
    • Repos
    • Object types: Blobs, Trees, Commits, Tags
    • SHA1 Hash
    • The index
  • Init and Clone
  • Adding
  • Commiting
  • Branches
  • Diff
  • Merges
  • Remote Repositories

Example commands

  • Three basic startup commands: init, add, commit
  • find ., .git/objects
  • commit, commit -am "message"
  • ls-files -s, --stage
  • cat-file -p <HASH> - shows what the file is
  • write-tree
  • status
  • log, log -1 --pretty=oneline
  • show
  • show-branch
  • rm, mv
  • blame
  • checkout
  • branch
  • diff
  • merge

Git + Matlab

Document Actions