1 of 15

Getting Started with Git & GitHub

Austen Sorochak

Impact Analyst

Ocean Hack Week 2026

A UNIVERSITY OF VICTORIA INITIATIVE

2 of 15

Today’s Goal: get you collaborating on GitHub

What you'll walk out able to do

  • Clone a Repo
  • Create a branch
  • Commit and push your work
  • Open a pull request
  • Review a teammate's PR
  • Resolve a merge conflict

Concepts We’ll Explore

  • Advantages of using Git & GitHub
  • Tracking changes in code
  • The phases of committing code
  • Collaboration Best Practices

OCEAN NETWORKS CANADA World Leading Discoveries at a Critical Time

3 of 15

What is your experience with git:

  1. I have not used git/Github before
  2. I have used only git/Github on my own projects
  3. I have collaborated with others using Git & Github

OCEAN NETWORKS CANADA World Leading Discoveries at a Critical Time

4 of 15

Git vs GitHub — not the same thing

Git

A version control system on your computer.

  • Tracks every change over time
  • Lets you go back to any version
  • Works offline, local

GitHub

A platform in the cloud, built on top of Git.

  • Backs up and shares your repos
  • Collaboration: PRs, issues, reviews
  • Your portfolio + a bit social (follow, star, share)

Think of it like Google Docs for code: Git is the version history, GitHub is the shared drive everyone works from.

On CryoCloud, Git is already installed. (Only need to install it if you later work locally on your own machine.)

OCEAN NETWORKS CANADA World Leading Discoveries at a Critical Time

5 of 15

Why we start here

Code safety

Every change is tracked, attributed, and reversible. Nobody overwrites anybody's work.

Real collaboration

Discuss, propose, review. It's how your project team will divide and merge work this week.

If you mess up, you can always go back. That safety net is the whole reason version control exists.

OCEAN NETWORKS CANADA World Leading Discoveries at a Critical Time

6 of 15

The four places your code lives

Every command today just moves your work between these four boxes.

Working dir

files you edit

Staging

marked to save

Local repo

saved on the hub

GitHub

shared with everyone

add

commit

push

pull - bring GitHub's changes back down to you

status - tells you which box your stuff is in. When lost, run it.

OCEAN NETWORKS CANADA World Leading Discoveries at a Critical Time

7 of 15

Branches & Pull Requests

A branch is your own safe lane. A pull request proposes merging it back.

your branch (feature branch or bug fix branch)

Pull Request + merge

review, then combine

When two commits change the same lines of code on the same branch, the merge needs you to choose which to keep.

That's a merge conflict — normal, expected, and fixable. Not an error, not a bug. We'll trigger a bunch on purpose in Round 2.

main branch

switch -c newBugFix

OCEAN NETWORKS CANADA World Leading Discoveries at a Critical Time

8 of 15

What this looks like in the wild

A quick look at GitHub before we build our own.

1

SoundBird — a personal project

github.com/sorochak/SoundBird

A good README tells you what a project is in 10 seconds. That's the standard you're aiming for.

Commits, PRs, and Issues

2

metadata-entry-form — a real team tool

github.com/cioos-siooc/metadata-entry-form

Documentation done on software a team actually depends on.

3

GitHub is also social

Stars ★ · Following · Profiles

Star repos you find useful, follow people doing interesting work. Your profile becomes your portfolio.

OCEAN NETWORKS CANADA World Leading Discoveries at a Critical Time

9 of 15

Git Tips & Best Practices

  • Commit Often: Make small, frequent commits with clear, concise messages.
  • Don’t Commit Secrets: Never push passwords, API keys, or sensitive data to your public repository.
  • Use Branches: Always create a new branch for new features or bug fixes.
  • Pull First: Always run ‘git pull’ before starting your work each day to get the latest changes from your teammates.

OCEAN NETWORKS CANADA World Leading Discoveries at a Critical Time

10 of 15

We're all jumping into one repo

20+ people, the same repository, at the same time.

Round 1 - your own file

The clean happy path.

  • Branch, commit, push, open a PR, review a neighbour, merge.
  • Everyone edits a different file, nothing collides.

Goal: build confidence in the full loop.

Round 2 - one shared file

Conflicts on purpose.

  • Everyone edits the same line of roll_call.md.
  • Merges collide, we fix them together.

Goal: make conflicts boring here, not scary on your project.

The whole point: we WANT the conflicts. Better to hit them here first, together.

Repo: github.com/oceanhackweek/ohw26-intro-activity

Open in Separate Tabs: README.md; SETUP.md; Cryocloud JupyterHub

OCEAN NETWORKS CANADA World Leading Discoveries at a Critical Time

11 of 15

Setup - Instructions in SETUP.md

1

Log in to CryoCloud

hub.cryointhecloud.com — sign in with GitHub, open a Terminal (Launcher → Other).

2

Org membership = Public

In the OceanHackWeek org People tab, switch yourself Private → Public. Login fails otherwise.

3

Authenticate git

Run gh auth login and follow the steps in SETUP.md. Stuck? Let us know and someone will help you.

4

Confirm it worked

Run gh auth status. See 'Logged in as [you]'? You're ready.

OCEAN NETWORKS CANADA World Leading Discoveries at a Critical Time

12 of 15

Round 1 — your own file

Different files, no collisions. This should go smoothly.

git clone https://github.com/oceanhackweek/ohw26-intro-activity.git

cd ohw26-intro-activity

git switch -c intro-YOURHANDLE

# make introductions/YOURHANDLE.md

git status

git add introductions/YOURHANDLE.md

git commit -m "Add intro (closes #12)"

git push -u origin intro-YOURHANDLE

# then on GitHub: open a PR, review a

# neighbour's, approve, and merge

The loop

1

branch

2

edit

3

add

4

commit

5

push

6

PR

7

review

8

merge

OCEAN NETWORKS CANADA World Leading Discoveries at a Critical Time

13 of 15

Round 2 — the shared file

This WILL conflict. That is the plan, not a problem.

Update main git switch main → git pull origin main (Round 1's merges land locally)

New branch git switch -c rollcall-YOURHANDLE

Edit the same spot Add your row at the top of roll_call.md — everyone in the same place

Push & PR git add · commit · push, then open a PR

Hit a conflict? Great. Next slide is the fix. Nothing is broken.

OCEAN NETWORKS CANADA World Leading Discoveries at a Critical Time

14 of 15

Resolving a merge conflict

Two people changed the same lines. Git needs you to pick. Calm, three steps.

git switch main

git pull origin main

git switch rollcall-YOURHANDLE

git merge main

# git flags the conflict:

<<<<<<< HEAD

your line

=======

their line

>>>>>>> main

# keep both, delete the markers

Then finish the merge

  • git add roll_call.md
  • git commit
  • git push

Refresh the PR — the conflict is gone.

Nothing was broken. Nothing was lost. You just did the scary thing.

OCEAN NETWORKS CANADA World Leading Discoveries at a Critical Time

15 of 15

You can now collaborate on a repo

Daily loop

branch → commit → push → PR → merge

The whole cycle you just practised.

When lost

git status

It tells you which box your work is in.

Conflicts

not errors

Git asking a human to choose. You've done it now.

Tomorrow

your project repo

Same moves, also, .gitignore keeps junk out.

Cheat sheet + full walkthrough live in the repo README. See you in the projects.

OCEAN NETWORKS CANADA World Leading Discoveries at a Critical Time