Home Background Installation

What is Git?

What is Version Control?

Version Control is a file tracking system with the following functionality.

  1. Co-Development
    • Multiple developers modify project files simultaneously and independently
    • Each developer has their own instance of the project files
  2. Synchronization
    • All modifications amongst developers are merged and any potential conflicts are resolved
  3. Revision History
    • Modifications to project files by any developer are logged and time-stamped

Gfw tutorial logo

The History of Git

  • Began in 2005
    • Linus Torvalds & the Linux community
  • Goals
    • Free and open-source
    • Speed
    • Simple
    • Non-linear development
    • Fully distributed
  • Windows
    • You are using "Git for Windows"
    • Windows Vista and newer

Terminology

  • Git
    • Available 3-letter word amongst Unix commands
    • Global Information Tracker (not really)
  • VCS
    • Version Control System
    • DVCS - Distributed Version Control System
  • SCM
    • Software Configuration Management
    • Software Change Management
    • Source Code Management
    • Supply Chain Management
    • You pick one!
  • SVN

Git website intro

The Evolution of Version Control

Generation Network Content Operations Synchronization Example Software
First None Single file Locks RCS, SCCS
Second Centralized File trees Update before commit CVS, SVN, Visual SourceSafe, TFS
Third Distributed Changesets Commit before merge Git, Mercurial, BitKeeper, Bazaar

See Eric Sink's History of Version Control.

Version Control Repository Definitions

File tree diagram

Changeset diagram

Git Mechanisms

Distributed vs. Centralized (Git vs. SVN)

Git - DVCS

  • Fully distributed, parallel programming
  • Local repository for offline development
  • Good large project performance

DVCS diagram

SVN - Centralized VCS

  • Straightforward commands
  • Rigid history
  • Good large file performance

CVCS diagram

See Michael Ernst's Version Control Concepts and Best Practices

Mechanism Definitions

There are five mechanisms that complete the full functionality of Git's version control

Mechanism definition diagram

Basic Commands

Here's a look at some fundamental Git commands across the five Git mechanisms.

Visual git command diagram

See Andrew Peterson's Visual Git Cheatsheet