GitHub Workflow#
Overview#
This document provides step-by-step instructions for working with course materials using Git and GitHub. You’ll learn essential version control skills while accessing course notebooks and submitting assignments.
Prerequisites#
A GitHub account (create one at github.com if you don’t have one)
Git and GitHub Desktop installed on your computer
Basic familiarity with command line/terminal
Initial Setup#
Step 1: Fork the Course Repository#
Navigate to the course repository
Click the “Fork” button in the top-right corner
Select your GitHub account as the destination
Wait for GitHub to create your personal copy of the repository
Step 2: Clone Your Fork Locally#
On your forked repository page, click the green “Code” button
Copy the HTTPS URL it should look like:
https://github.com/dmatekenya/AIMS-DSCBI.git
Open your terminal/command prompt
Navigate to where you want to store the course files
Run the clone command:
git clone https://github.com/dmatekenya/AIMS-DSCBI
Alternatively, you can closne with GitHub Desktop
Navigate into the repository folder:
cd COURSE-REPO-NAME
Open the folder in VS Code if you need to.
Step 3: Add Upstream Remote#
This allows you to get updates from the instructor’s original repository:
git remote add upstream https://github.com/dmatekenya/AIMS-DSCBI.git
Verify your remotes:
git remote -v
You should see both origin
(your fork) and upstream
(instructor’s repo).
Getting Course Updates#
When the instructor adds new materials (notebooks, assignments, etc.), follow these steps:
Step 1: Fetch Updates from Instructor#
git fetch upstream
Step 2: Switch to Main Branch#
git checkout main
Step 3: Merge Updates#
git merge upstream/main
Step 4: Push Updates to Your Fork#
git push origin main
Working with Course Materials#
Making Changes to Notebooks#
Work directly on notebooks in the appropriate folders in VS Code
Save your work regularly in Jupyter or your preferred editor
Commit your changes frequently:
git add . git commit -m "Updated notebook exercises for week 2"
Push your work to your fork:
git push origin main
Note: Specific assignment instructions and submission procedures will be provided separately for each assignment.