last updated 9/21/2020
This is a repository to teach basic Git and GitHub skills to newcomers in a quick one-hour lesson. The lesson includes an interactive element, using either Python, MATLAB, or R. The tutorial leader can setup for the interactive element by following the interactive element setup instructions.
The tutorial is based on the excellent tutorial presented at the ASB 2020 Conference. Thanks to the original contributers who put together the tutorial:
This section is intended to take attendees through the steps required before the tutorial.
There are three things that everyone needs to do BEFORE the tutorial.
-
Create a Github account.
-
Install Git
-
Install one of the following programs (ask the tutorial leader which they will be using)
Tutorial Leaders have an additional step to complete BEFORE the tutorial:
- Fork this GitHub repository for your group via these instructions.
This should be fairly self explanatory. Go the the GitHub website, and create a new account. If you are eligble, you can create a GitHub Education account with extra benefits
The git website has more detailed install instructions for all 3 operating systems.
The tutorial will focus on using Git Bash with GitHub, but there are desktop applications that you may be interested in using after the tutorial. These desktop applications will not be used in the tutorial.
To download Git and use the Bash application, go to this website and click the link associated with your version of Windows.
Note: There are many configuration options available during the setup wizard. The recommended settings will suffice for this tutorial.
With Mac (10.9 and above), you can install Git directly by running the command in terminal (without the $
):
$ git --version
You can also install Git through the binary installer, and can be downloaded here.
If you're on Fedora or another closely related distribution you should be able to run $ sudo dnf install git-all
or if you're on Debian-based, like Ubuntu run $ sudo apt install git-all
If these don't work, go to this page for more information.
Now that you have a GitHub account and downloaded Git, you need to configure Git so that it is connected to your GitHub account.
- Open Git Bash (Or Terminal on Mac) and execute these two lines, inserting your name and email associated with your GitHub account in quotations:
$ git config --global user.name "FIRSTNAME LASTNAME"
$ git config --global user.email "EMAIL-ASSOCIATED-WITH-GITHUB-ACCOUNT"
We setup this tutorial to be used with MATLAB, Python, and R. While Python and R are both free to use and download, MATLAB will require a license. Most universities provide students licenses.
These scripts were built in MATLAB 2019b, but we do not believe you need this specific version installed. Any recent version should work with our code. To download MATLAB go here.
We recommending using Python 2.7, 3.5, 3.6, or 3.7 with the Anaconda distribution. This is a large package that includes many of the base functions and IDE's that are very common to Python. If any of these versions of Python are not alredy installed on your computer, you may also consider installing it via Miniconda, a minimal installer for conda.
To download the full Anaconda distribution, go here and choose your installer near the bottom. Anaconda comes with a few possible IDE's, we prefer VScode but you can use whichever to edit the scripts and run them.
We will be R using version 3.6, and highly recommend following this tutorial with R in RStudio.