Repository setup

Week 0 - Setup session

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 session, you will:

Setup

There is no setup required by students for this discussion section, the instructor will guide the activities for it.

1. Create repository

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

    • Repository name: eds220-2025-sections.

    • Description: Discussion sections work 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 Data*.

## Course Information

- **Course Title:** [EDS 220 - Working with Environmental Datasets](https://bren.ucsb.edu/courses/eds-220)
- **Term:** Fall 2025
- **Program:** [UCSB Masters in Environmental Data Science](https://bren.ucsb.edu/masters-programs/master-environmental-data-science).

Teaching Team:

- **Instructor:** [Carmen Galaz García](https://github.com/carmengg)
- **Co-Instructor:** [Annie Adams](https://github.com/annieradams) 

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. If you do not have a MEDS directory, go ahead and create one.

  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 you’re cloning into the desired location (this hsould be inside the EDS-220 directory). After you run pwd you should get a file path that looks like this:

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

    2. Navigate 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 (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