In this course, students will learn what version control is, why it is important, and how it can be used in data science projects. Each day will begin with a lecture, followed by hands-on practice. The first day will focus on the git distributed version control system. Students will create a new git project, track changes to code, and recover from simple mistakes. The second day will focus on collaborating with others via GitHub. Students will contribute to an existing project via pull requests.
This repository contains lab materials (i.e., the hands-on exercises) for this class. See the links below for details on each exercise.
You will need to have
git
installed on your laptop for this class.
You will also need a plain text editor; we recommend
VS Code.
You can install both git and VS Code as user, without requiring admin
privileges.
Familiarity with Unix will be helpful, but not strictly required.
The recommended way to install git is as described in the
documentation,
which will require admin privileges (please contact IT for assistance).
You can alternatively install git without requiring admin privileges as
follows:
-
Install conda as user: see anaconda installation.
-
Install
gitusing conda inside a new conda environment. To do this, in Terminal or Anaconda Prompt, execute:conda create -n mygitenv git
-
Activate this environment by executing in Terminal or Anaconda Prompt:
conda activate mygitenv
-
Test that you have
git:git --version
It is highly recommended to install VS Code as user, as this will allow you to update VS Code and install extensions yourself. (If you install it with admin privileges, then you'll need admin privileges each time you need to update it or install an extension.)
To install VS Code as user on Windows, follow
these instructions.
On MacOS, you simply need to drag and drop the downloaded application to a
user directory where you have write permissions (rather than the
/Applications/ directory).
- Exercise - Try out Git:
You can use
gitvia a web browser; sign in using SSO to gain access to Azure Cloud Shell for 2 hours - GIT Web Terminal: web browser-based terminal
where you can test out
gitcommands; not allgitcommands are supported (e.g.,git init)