Where We Left Off

  • Working Directory

  • Staging Area

  • Local Repository

Today we add:

→ Remote Repository (GitHub)

What is GitHub?

  • Hosts Git repositories online
  • Enables collaboration
  • Provides issue tracking & project tools
  • Used widely in industry and research

Why GitHub Matters in Data Analytics

  • Share code with teammates
  • Track changes in data workflows
  • Portfolio building
  • Reproducible research
  • Open-source collaboration

Local vs Remote

  • push = local → remote
  • pull = remote → local

Create a GitHub Account

Instructions:

Create a Remote Repository

Steps:

  1. Click “New”
  2. Name repository
  3. Do NOT initialize with README (we will do this later)
  4. Create repository

Using the Terminal and Command Prompt

  1. Create a new folder called github-workshop
  2. Open a terminal inside that folder.
  3. Initialize Git:
git init


Git Configuration (Optional)

git config --global user.name "Your Name"
git config --global user.email "you@example.com"

Create a README file

  1. Create a file called: README.md
  2. Add the following text to the README.md file:

This repository was created during the GitHub workshop.

  1. Stage and commit:
git add README.md
git commit -m "first commit"

Checkpoint

Run:

git log

Push Local Repository to GitHub

Ready to push local repository to GitHub

git branch -M main
git remote add origin https://github.com/username/repo-name.git
git push -u origin main

You should be promoted to the following page and it requires you to sign in GitHub.

What Just Happened?

  • GitHub now has your history
  • Your commits are stored remotely
  • You can access from another computer

Pull Example

If we are working with other people using the same repository, we may have to update our local repository so it is up to date.

For the demo, let’s make some changes in the README.md file online by adding some text and commit changes. Then, we can return to the terminal in the working directory and run the command below.


git status
git pull origin main


This will

  • Update local repo
  • Synchronize changes

GitHub Desktop

  • Visual interface
  • Commit button
  • Push button
  • History view

Desktop is Convenient — But Know the Engine


You can download GitHub Desktop here.

Why Learn the Terminal?

Bullet comparison:

Terminal
Universal
Works on servers
Required in many jobs
Better troubleshooting
Desktop
GUI-based
Local app
Easier for beginners
Visual clarity

Understanding commands builds confidence.

📝 Worksheet Activity

The worksheet can be downloaded here.

Part A — Local → Remote (Push Workflow)

Goal: Make your local and GitHub repositories identical.

  1. Create a GitHub repo
  2. Create a new local repo
  3. Create a README file
  4. Commit the file
  5. Push (connect remote for the first time)
  6. Modify README locally
  7. Commit again
  8. Push to GitHub
  9. View history on GitHub

📝 Worksheet Activity (Continue)

Part B — Remote → Local (Pull Workflow)

Goal: Simulate collaboration and synchronize updates.

  1. Make a change in the README file on GitHub
  2. Pull changes to the local repo


Optional Challenge (if time)

  • Clone your repo into a new folder
  • Verify history exists

Final Takeaways

  • GitHub hosts your Git repositories online.
  • A remote repository allows collaboration and backup.
  • push sends your commits to GitHub.
  • pull brings updates from GitHub to your local machine.
  • Understanding Git commands builds confidence beyond GUI tools.
  • Version control is a valuable industry skill.

Version control is not just for programmers — it is for anyone managing evolving work.

Thank you for participating!

Please do not hesitate to contact me (Tessa Chen) at   ychen4@udayton.edu for questions or further discussions.


AI Acknowledgment: This presentation was prepared with the assistance of AI-based tools for drafting, editing, and formatting support. All content and interpretations are the author’s own.