Repository setup

Week 0 - Discussion section

This discussion section will guide you through setting up a repository where you will collect your notebooks for the course’s discussion sections. In this discussion section, you will:

Setup

Our TA will guide the activities for this discussion section.

1. Create repository

  1. Create a new repository on GitHub. Use the following settings:

    • Repository name: eds220-2024-sections.

    • Description: Work during discussion sections for the EDS 220 MEDS course.

    • Keep the repository public.

    • Add a README file.

    • Add a Python .gitignore template.

  2. In GitHub, update your repository’s README by:

    1. Deleting the text that was automatically generated when you created the repo.
    2. Copy-pasting the markdown text below, do not update [YOUR NAME HERE] yet.
# EDS 220 Discussion Sections Repository

This repository hosts all the work completed by [YOUR NAME HERE] during the discussion sections of EDS 220 - *Working with Environmental Datasets*.

## Course Information

- **Course Title:** EDS 220 - Working with Environmental Datasets
- **Term:** Fall 2024
- **Program:** [UCSB Masters in Environmental Data Science](https://bren.ucsb.edu/masters-programs/master-environmental-data-science)
- **Instructor:** Carmen Galaz García
- **TA:** Annie Adams 

Complete materials for the discussion sections and additional resources can be found on the [course website](https://meds-eds-220.github.io/MEDS-eds-220-course/discussion-sections/discussion-sections-listing.html).
  1. Add the URL to your GitHub repository to this spreadhseet.

MAKE SURE YOU’VE SUCCESSFULLY SET UP YOUR REPOSITORY ON GITHUB BEFORE CONTINUING

2. Clone the repository

  1. At Bren’s workbench 1 server, start a new JupyterLab session or access an active one.

  2. Inside your MEDS/ directory, create a new directory called EDS-220. We’ll use this directory to collect all the repositories used in the course.

  3. In the terminal, navigate to the EDS-220 directory by using cd NAME-OF-DIRECTORY.

  4. Using the terminal, clone the repository into your EDS-220 directory. To do this:

    1. In your repository’s landing page on GitHub, click on the green button that says < > Code. In the HTTPS tab option, copy the URL that appears there.

    2. Go back to the server. In the terminal, run pwd (print working directory) to make sure we’ll be cloning into the desired location (inside the EDS-220 directory). The ouput should look like:

    /Users/c_galazgarcia/MEDS/EDS-220/
    1. Run git clone URL. You should see the directory appear in the folder navigation bar to the left

    2. Go into the cloned repo in the terminal: cd eds220-2024-sections.

3. Update your name and push changes

  1. Open the README.md file and update the [YOUR NAME HERE] with your name. Save your changes.

  2. Push your changes to your remote repository (remember, in this case, this is how we call the copy of your repo that lives in GitHub). To do this, remember the basic git routine:

    1. git status : check git status, shows which files are staged, modified, or untracked
    2. git add FILE-NAME : stage files that have been updated, these files will be added to your next commit
    3. git status : check git status again to confirm you have staged the right files
    4. git commit -m "Commit message" : create a commit with message
    5. git pull : pull latest changes before pushing to ensure your local repo is up-to-date
    6. git push : push your changes to upstream repo
  3. You should have previously configured your personal access token (PAT) during summer session, but it might be possible that it is not cached anymore and you are prompted to create a new one when doing git push. If this is the case:

    1. Follow the instructions in the MEDS setup guide to create a new PAT.
    2. Once you have created your PAT, do git push again to push your changes.

MAKE SURE YOU’VE SUCCESSFULLY PUSHED YOUR UPDATES BEFORE ENDING