Learning Goals

At the end of this exercise, you will be able to:
1. Create a new repository on GitHub and link it to GitHub Desktop.
2. Improve the aesthetics and information about your repository.
3. Use GitHub Desktop to manage your repository.
4. Commit, push and pull files on GitHub.

GitHub

GitHub is a file storage and management site used by programmers. Programmers upload code to repositories (folders) and make it publicly available. We will use Github to store our work and manage workflows in BIS 15L.

Your GitHub account

Since we will use GitHub for assignments, you need to have an account and make a repository for BIS 15L. If you followed the setup instructions then you should be all set. Please Email your GitHub user name to Bry.

We have a main repository for our class datascibiol. You should Star this repository for future reference.

Make Your Own Repository

  1. Go to github.com and login.
  2. Create a new repository.
  3. Under repository name, use the title BIS15W2025_your first initial and lastname. Mine looks like this: BIS15W2025_jledford
  4. Default settings are fine, but do click “Initialize this repository with a README”.
  5. Once the repository is made, click on settings in the top right.
  6. On the left toolbar click “Collaborators”.
  7. Add “jmledford3115” and “bryshalm” as collaborators.
  8. Go to Settings and scroll down to Danger Zone.
  9. Change visibility to private.

GitHub Desktop

The easiest way to manage your GitHub repository is to use GitHub desktop. This is a helpful tool that will allow you to manage all of your files. Open the program and login using your GitHub account.

Clone Your Repository

In GitHub desktop, you will see your personal repository as an option under clone repository. Clone your repository to the desktop. Once you have done this any changes you make to files will be recorded and easily uploaded. Do not move this folder from your desktop.

Copy the Class Repository

In order to keep track of the class files, the last thing you need to do is make a copy of the class repository. I will make regular changes to the class repository including the addition of files and data that you will need. Do a search for datascibiol and download a copy to the desktop. You do this by navigating to the repository then going to the small green code button at top right. Click on the code button then go to Download ZIP.

Copy the lab1 folder from the class repository and paste it into your personal repository. By doing this, you have created your own copies of lab materials for lab 1.

Using GitHub

You will use your repository to store all of your notes and work. There are three terms that we need to define:
1. Commit takes a snapshot of your current progress.
2. Pull this is the same as download.
3. Push this is the same as upload.

If you setup GitHub desktop, then you will see that it automatically tracks your changes. Clicking the Commit to master button in the bottom left corner means that you are recording a snapshot of your edits locally. Once this is done, you need to upload your changes to GitHub. This is done by clicking Push origin. Once you have pushed your changes you can double check by looking at your repository on github.com.

Adjust your README

  1. Open the file README.md in RStudio.
  2. Use markdown to add basic information, including your name and a description of the contents.
  3. Do not add personal information, including your SID.

Practice

Since you will use your GitHub repository extensively in class, we need to practice.
1. Navigate to your repository and find the file dummy_push in the lab 1 folder.
2. Open dummy_push.
3. Add your name under author at the top of the page.
4. Save this file.
5. Knit the file.
6. Use GitHub Desktop to first Commit to master and then Push origin to your GitHub repository.

Wrap-up

Please review the learning goals and be sure to use the code here as a reference when completing the homework.

–>Home