Git/Github

Emily Chao(elchao2), Berwin Xie(bxie6)

Prerequisites: Installing Git

OSX

  1. Open Terminal.
  2. xcode-select --install
  3. Confirm installation by typing which git. There should be a file path instead of a not found error.
  4. See here for troubleshooting.

Windows

  1. Download Git from https://git-scm.com/download/win.
  2. Follow the instructions for the installer.
  3. You should now have a Git Bash terminal application installed.
  4. See here for troubleshooting.

Linux

  1. Install Git using your favorite package manager for your specific Linux distro.
  2. Open a terminal.
  3. Ex. Fedora-like systems sudo yum install git-all.
  4. Ex. Ubuntu/Debian systems sudo apt-get install git-all.
  5. Confirm installation by typing which git. You should see a file path instead of a not found error.
  6. See here for troubleshooting.

What is a Version Control System?

  • Collaboration tool for computer scientists
  • Records changes to files in a designated directory - snapshot
  • Minimizes conflict between collaborators on the same file
  • Allows for reverting to previous revisions of files

What is Git?

  • One of the most popular version control systems used today
  • Designed by Linus Torvalds, the creator of the Linux kernel
  • Supports branching and merging
  • Allows you to save code in a repository
  • Similar tools: SVN, Mercurial, Perforce, Piper

What is Github?

  • A company that allows you to store git repositories in the cloud
  • Widely used by the open-source software community
  • Collaboration tools - issue tracking, project wiki, forking/pull requests
  • Can host static websites using a git repository - Github Pages

How to use Git/Github?

  1. Github's own desktop client for your operating system
  2. Downloading git and using a terminal

A typical Git workflow for an individual

individual workflow for git

One Git workflow for teams

team workflow for git - branch

Another Git workflow for teams

team workflow for git - fork

Tutorial

  1. Go to the IllinoisWCS Github org and fork the git-skeleton repository.
  2. Clone your forked version.
  3. Add your name to the README.md file.
  4. Add, commit and push this change to your forked repository.
  5. Make a pull request.