UIU Data Science Club · Workshop

Mastering Version Control
for Coders

A hands-on guide to Git and GitHub — from zero to professional workflow.

Instructor
Azraf Al Monzim
Venue
Room 309
Date
Tuesday, April 7 · 2026
Time
1:50 PM - 4:30 PM
Workshop Agenda
00Introduction & Setup Check1:50 - 2:00
01What is Git? Core Concepts2:00 - 2:30
02Everyday Git Commands (Hands-on)2:30 - 3:10
Break3:10 - 3:20
03GitHub — Profile, Pages, Repositories3:20 - 3:55
04Collaboration Workflows3:55 - 4:20
05Q&A, Recap, What's Next4:20 - 4:30
§ 00

Introduction & Setup

10 min

//Why Does This Matter?

Every professional software engineer uses version control daily. Not knowing Git means you can&pos;t collaborate on real projects, contribute to open-source, or even apply for most internships and jobs.

Without Git

project_final_v3_FINAL_USE_THIS.zip — Lost code. Broken features. No history.

With Git

Every change tracked. Instantly revert. Collaborate without conflicts.

Industry Standard

94% of developers use Git. GitHub has 100M+ users worldwide.

//Pre-Workshop Setup

Make sure everyone has the following before continuing:

  • Git installed run git --version in terminal
  • GitHub account created at github.com
  • VS Code or any text editor open
  • Terminal / Command Prompt ready
Windows Users
Use Git Bash (comes with Git for Windows) instead of CMD. All commands in this guide are for bash-style terminals.
§ 01

What is Git?

30 min

//The Simple Explanation

Git is a time machine for your code. It records snapshots of your project over time, so you can see what changed, when, and by whom — and go back to any point in history.

Git is local — it lives on your computer. GitHub is the cloud service where you store and share your Git repositories.

Key Distinction
Git ≠ GitHub. Git is the tool (like a programming language). GitHub is a platform built on top of Git (like a website using that language). You can use Git without GitHub.

//Core Concepts You Must Know

Repository (Repo)

A folder tracked by Git. Contains your project files + hidden .git/ folder with all history.

Commit

A saved snapshot of your project at a point in time. Like pressing Save, but permanently recorded with a message.

Branch

A parallel version of your project. Work on features without breaking the main code. Merge when done.

Staging Area

A holding area between your edits and a commit. Choose exactly which files go into each snapshot.

Remote

A copy of your repo stored online (e.g. GitHub). Push your commits there to back up and share.

Clone

Downloading a remote repository to your local machine. Gets you all the code AND all history.

//The Git Lifecycle

✏️
Edit Files
Working Directory
📋
Stage Changes
git add
📸
Commit
git commit
☁️
Push
git push
🌍
GitHub
Remote Repo

//First-time Git Configuration

Run these once on any new machine to tell Git who you are:

bash — one-time setup
$git config --global user.name "Your Name"
$git config --global user.email "you@example.com"
$git config --global core.editor "code --wait" # use VS Code
$git config --list # verify settings
§ 02

Everyday Git Commands

40 min

//Starting a Repository

bash — init a new project
$mkdir my-project && cd my-project
$git init
Initialized empty Git repository in /my-project/.git/
Pro Tip
Always run git init at the root of your project, not inside a subfolder. Look for the .git hidden folder — if it's there, you're inside a repo.

//Checking What's Happening

These are the two commands you'll use the most — run them constantly to know your current state.

bash — status & log
$git status # what's changed? what's staged?
On branch main
Untracked files: index.html
$git log --oneline # compact commit history
a3f4c12 Fix navbar alignment
d8e1b09 Add login page
9f2a341 Initial commit

//The Save Loop: Add → Commit

This is the core workflow you'll repeat hundreds of times a day as a developer.

bash — stage and commit
$git add index.html # stage a specific file
$git add . # stage ALL changed files
$git status # verify what's staged (green = staged)
Changes to be committed: index.html
$git commit -m "Add homepage layout"
[main a3f4c12] Add homepage layout
1 file changed, 24 insertions(+)
Write Good Commit Messages
Bad: "fix stuff", "asdf", "changes"
Good: "Add user authentication with JWT", "Fix null pointer in login handler"

Rule: Start with a verb. Describe what and why, not how. Future-you will thank you.

//Ignoring Files with .gitignore

Never commit passwords, API keys, or node_modules. Create a .gitignore file in your repo root:

.gitignore — example
# Dependencies
node_modules/
# Environment variables (NEVER commit these!)
.env
.env.local
# Build output
dist/
build/
# OS files
.DS_Store
Thumbs.db
Shortcut
Use gitignore.io or GitHub's built-in templates to auto-generate .gitignore for your stack (Python, Node, etc.).

//Branching and Merging

Branches let you work on a feature in isolation. Main/master is production — never break it directly.

bash — branches
$git branch # list branches (* = current)
* main
$git checkout -b feature/login-page # create + switch
Switched to a new branch 'feature/login-page'
  ... make your changes, add, commit ...
$git checkout main # switch back to main
$git merge feature/login-page # bring changes into main
Updating a3f4c12..d8e1b09
Fast-forward: login.html | 40 ++++++

//Quick Reference — All Essential Commands

CommandWhat it doesFrequency
git initInitialize a new repository in current foldersetup
git statusShow current state — what's changed, staged, or untrackeddaily
git add .Stage all changed files for the next commitdaily
git commit -m "msg"Save a snapshot with a descriptive messagedaily
git log --onelineShow compact commit historydaily
git diffShow exact line-by-line changes not yet stageduseful
git checkout -b <name>Create and switch to a new branchdaily
git checkout <branch>Switch to an existing branchdaily
git merge <branch>Merge another branch into current branchuseful
git clone <url>Download a remote repository locallyteam
git pullFetch and merge latest changes from remoteteam
git push origin mainUpload local commits to GitHub (remote)team
git stashTemporarily save uncommitted work and clean working diruseful
10-Minute Break — 3:10 PM

Stretch, grab water, ask quick questions. Back at 3:20 PM sharp.

§ 03

GitHub — Profile, Pages & Repos

35 min

//What is GitHub?

GitHub is the world's largest platform for hosting Git repositories. Think of it as Google Drive for code — but with superpowers: collaboration tools, issue tracking, automated pipelines, and a built-in portfolio system.

When a company looks at your resume, the first thing many engineers check is your GitHub profile. It's your public portfolio.

//Repositories: Public vs Private

Public Repository

Anyone on the internet can view it. Great for portfolios, open-source, and sharing your work with recruiters.

Private Repository

Only you and invited collaborators can see it. Use for client work, personal projects, and anything confidential.

README.md

The landing page of every repo. Always write one — explain what the project is, how to run it, and what it does.

//Connecting Local Repo to GitHub

bash — push local repo to GitHub
# 1. Create repo on GitHub first (no README, no .gitignore)
# 2. Copy the remote URL, then run:
$git remote add origin https://github.com/username/repo-name.git
$git branch -M main # rename branch to main
$git push -u origin main # first push, sets upstream
Enumerating objects: 5, done.
Branch 'main' set up to track remote branch 'main' from 'origin'.

//The GitHub Profile README

A secret feature: create a repo named exactly your GitHub username. Add a README.md inside — it shows up on your GitHub profile page as a custom banner.

README.md — profile example
# Hi, I'm Monzim 👋
🎓 CSE @ UIU | Data Science Enthusiast
🔭 Working on: AI Interview Platform
🌱 Currently learning: TypeScript, LangChain
📫 Reach me: yourname@email.com
![GitHub stats](https://github-readme-stats.vercel.app/api?username=YOUR_USERNAME)

//GitHub Pages — Free Website Hosting

GitHub Pages lets you host a static website for free, directly from any repository. Your URL will be username.github.io/repo-name. Perfect for portfolios and project demos.

  1. Go to your repository → Settings Pages
  2. Under "Source", select branch main, folder / (root)
  3. Click Save
  4. Wait 1-2 minutes — your site is live!
Portfolio Tip
Create a repo named username.github.io (exactly) and push an index.html there. This becomes your root portfolio site at https://username.github.io.
Live Exercise
Everyone create a simple index.html with your name and push it to a new GitHub repo. Enable Pages and share your live URL in the group chat.
§ 04

Collaboration Workflows

25 min

//How Teams Actually Use GitHub

Real-world projects follow a standard workflow. Understanding this gets you ready to contribute to any team or open-source project on day one.

//Fork → Clone → PR Workflow

This is the standard workflow for contributing to projects you don't own (open-source or team repos):

🍴
Fork
Copy to your account
⬇️
Clone
Download locally
🌿
Branch
Isolate your work
📸
Commit
Save your changes
☁️
Push
To your fork
🔁
Pull Request
Request merge
bash — fork & contribute workflow
# 1. Fork on GitHub UI (click the Fork button)
# 2. Clone YOUR fork
$git clone https://github.com/YOUR-USERNAME/repo.git
$cd repo
# 3. Create a feature branch
$git checkout -b feature/add-my-name
# 4. Make changes, then commit
$git add . && git commit -m "Add my name to contributors list"
# 5. Push to YOUR fork
$git push origin feature/add-my-name
# 6. Go to GitHub → click "Compare & pull request" → Submit PR

//Pull Requests (PRs)

A PR is a request to merge your branch into someone else's branch. It opens a discussion thread where team members can review your code, leave comments, request changes, and finally approve and merge.

  • Title: Describe what the PR does in one sentence
  • Description: Why this change? What does it fix/add? Screenshots if UI changed
  • Request Reviewers: Tag teammates who should review
  • Link Issues: Use "Fixes #12" to auto-close related issues on merge

//Issues

Issues are GitHub's task tracker. Use them to report bugs, request features, or assign work to team members. Every serious open-source project runs on issues.

//Resolving Merge Conflicts

Conflicts happen when two people edit the same line. Git marks the conflict in the file — you resolve it manually:

conflict markers in a file
<<<<<<< HEAD
const greeting = "Hello World";
=======
const greeting = "Hi Everyone";
>>>>>>> feature/update-greeting
→ Delete the markers, keep the version you want, then:
$git add . && git commit -m "Resolve merge conflict in greeting"
Avoid Conflicts
Always git pull before starting new work. Use short-lived branches — merge often. Communicate with your team about who's working where.
§ 05

Recap & What's Next

10 min

//Today You Learned

Git Fundamentals

init, status, add, commit, log, branch, merge — the core save loop.

GitHub Basics

Repos, profile README, GitHub Pages, pushing code to remote.

Team Workflow

Fork, clone, branch, PR — the industry-standard collaboration cycle.

//Your Homework (Do This Tonight)

  1. Create your GitHub profile README and push it live
  2. Create a new repo, add a simple HTML page, enable GitHub Pages
  3. Fork any public repo on GitHub and submit a small PR
  4. Commit something every day this week — build the habit

//What to Learn Next

  • Git Rebasecleaner alternative to merge for linear history
  • GitHub Actionsautomate testing and deployment (CI/CD)
  • git stashsave WIP changes and switch context fast
  • Protected Branches + Code Reviewenterprise team practices
  • Semantic Versioning + Tagsversion your releases properly
// Quick Reference - Take This Home
Resources
git-scm.com/doc — Official Git documentation
learngitbranching.js.org — Interactive visual Git tutorial
github.com/skills — GitHub's own free hands-on courses
ohshitgit.com — When things go wrong

Want to deploy your projects for free and automate workflows?

GitHub Pages & Workflows Guide