Git: version control system

References

History

In 2005, the relationship between the community that developed the Linux kernel and the commercial company that developed BitKeeper broke down, and the tool’s free-of-charge status was revoked. This prompted the Linux development community (and in particular Linus Torvalds, the creator of Linux) to develop their own tool based on some of the lessons they learned while using BitKeeper. Some of the goals of the new system were as follows:

  • Speed
  • Simple design
  • Strong support for non-linear development (thousands of parallel branches)
  • Fully distributed

Distributed Version Control Systems (such as Git, Mercurial, Bazaar or Darcs), clients fully mirror the repository, including its history. Thus, if any server dies, and these systems were collaborating via that server, any of the client repositories can be copied back up to the server to restore it. Every clone is really a full backup of all the data.

Concepts

Beginner

  • initialize, track changes
  • commit save points
  • push to remote repository

Advanced

  • Upstream/Downstream
  • Pull requests
  • Branches, Forks
  • Conflict resolution

Install Git

  1. Download the executable file from https://git-scm.com/downloads
  2. Install Git
  3. This should now be available via a command window or the GUI

Help

  • quick refresher on the available options for a Git command, you can ask for the more concise help output:

    git -h or git --help

Review of Git Incantations

(1) Initialization

(2) Status

(3) Track Changes

(4) Commit Changes (save point)

(5) Review Log

(6) Make Changes, Review with Diff, and Commit

(7) Push Changes to a Remote Repository