Git and Github
BIOS 611: Introduction to Data Science
Instructor Matt Biggs
Overview of today
BIOS 611
Objectives
BIOS 611
Demonstration project
Includes the following frameworks:
BIOS 611
Demonstration project
BIOS 611
Feedback—essential for improvement
Feedback from peers and clients is the only way you’ll really know if what you’re doing is effective.
Without feedback, you can’t improve and you can’t produce a final product that will be used! Get feedback early and often!
In this course we will heavily emphasize:
BIOS 611
Feedback—essential for improvement
Project 1 feedback guidelines:
BIOS 611
Give me some feedback about my demo project!
What are the most important things to improve about the:
Let’s discuss some examples as a class.
BIOS 611
Git and Github
Git is a software tool that enables version control and collaboration
BIOS 611
Git and Github
Git is a software tool that enables version control and collaboration.
Why version control?
Why collaboration?
How does it enable collaboration?
BIOS 611
Git and Github
Git is a software tool that enables version control and collaboration
GitHub is a website for code storage. It makes your code (including all changes) visible and accessible from anywhere.
BIOS 611
Git and Github
Git is a software tool that enables version control and collaboration
GitHub is a website for code storage. It makes your code (including all changes) visible and accessible from anywhere.
Why is it important to have backups?
Why is important to make code visible and accessible?
BIOS 611
Git and GitHub
As a data scientist you will use GitHub throughout your career.
You should use Git in graduate school.
Potential employers will look at your GitHub activity.
We will use Git in this class to submit coursework and return project grades.
BIOS 611
BIOS 611
BIOS 611
BIOS 611
BIOS 611
BIOS 611
Branches
Branches allow you to work on a copy of the code that is entirely separate.
No worries about breaking anything!
BIOS 611
Essential Git Commands (and what they mean)
clone - make a local copy of a remote repository
add - track local changes in staging area
commit - record local changes in local repository
push - record local changes in remote repository
pull - pull changes from remote repository to your local repository
status - preview local changes
branch - make a separate copy of the local repository
checkout - change to a specific branch
BIOS 611
Other Git Commands (and what they mean)
There are other git/github topics that we won’t really use in this class, but you will probably encounter:
Pull request - request to merge a branch with master (usually used for collaborate projects, to avoid breaking someone else’s code)
Issues - Ways to track and have conversations around problems in the code
Project boards - Tools for organizing work
BIOS 611
Notes on Git
BIOS 611
Notes on Git continued...
BIOS 611
Github in our classroom
BIOS 611
QUIZ
Install Git and/or Git Desktop
Linux users can easily install git at the command line:
sudo apt-get update�sudo apt-get upgrade�sudo apt-get install git
Windows or Mac users can also install GitHub Desktop
You need to sign up for a GitHub account if you haven’t already.
BIOS 611
In-class exercise: Sharing Feedback with Git
BIOS 611
In-class exerise: Git-ting Started with Git
First, sign up for a Github account.
There are several ways to make a new repository. The details will be different based on command line or desktop versions of Git. These are the general steps:
Bonus learning:
Try editing your code directly on GitHub, then pulling the new version to your local folder
Make and checkout a branch, edit, make pull request and merge, checkout master, then pull
BIOS 611