BIO597 · Spatial Analysis of Biodiversity

A beginner’s tour
of GitHub

Using GitHub as a practical home for scripts, notes, figures, and project coordination

Supplemental lecture · Fall 2026
Today’s questions
  1. What is GitHub useful for if you are a biologist writing scripts?
  2. How do repositories, commits, issues, and projects fit together?
  3. Which features help make an analysis easier to find, rerun, and share?
  4. What should not be put on GitHub?
Big picture

GitHub is a project home, not just a code website

StoreScripts, notebooks, small data, figures, docs
TrackWhat changed, when, and why
CoordinateTasks, questions, bugs, deadlines
ShareMethods and materials with collaborators

Git is the version-control system. GitHub is the cloud platform built around it.

Research use case

Think of a repository as an analysis binder

CodeIssuesProjectsPull requestsInsights
README.mdWhat is this project and how do I run it?
scripts/Reusable Python or R scripts
notebooks/Exploration, teaching, or reports
data/Small derived or example data only
figures/Outputs used in talks, posters, manuscripts
environment.ymlPackages needed to rerun the analysis
Repository

The repository is the container for a project

Good repo size: one coherent analysis, class assignment, tool, or paper project.

Avoid one giant repository for every script you have ever written.

  • Files and folders
  • History of changes
  • Project notes and tasks
  • Settings for sharing and collaboration
README

The README is the front door

Minimum useful README

  • What question does this project answer?
  • What data are used?
  • Which script or notebook should run first?
  • Who maintains it?

Better README

  • Reproducible setup instructions
  • Folder guide
  • Expected outputs
  • Citation and license information
Commits

A commit is a saved checkpoint with a message

Edit filesFix a script, add a figure, update notes
→
CommitSave a named snapshot of the changes
→
PushSend the snapshot to GitHub

A good commit message says what changed in plain language.

History

GitHub can show what changed between versions

  • Find when a parameter changed
  • Recover a deleted code block
  • Compare old and new figures or scripts
  • Explain methods changes during a project
Example commit

Update amphibian cleaning filter

Removed records with coordinate uncertainty over 10 km and regenerated occurrence map.

Issues

Issues are lab notes with a status

Check why BIO12 extraction has missing values near the coast

Some occurrence points are valid but receive NoData after clipping. Need to inspect whether this is coastline mismatch or coordinate uncertainty.

bug/question raster assignment-05

Use issues for tasks, questions, bugs, ideas, and decisions you do not want to lose.

Issue habits

Write issues so another person can act on them

Vague

"Map broken."

Useful

"The Maine amphibian map renders points in the ocean after reprojection. I expected points to stay within the state boundary. See notebook cell 14."

A useful issue includes context, expected result, actual result, and next step.

Labels, assignees, milestones

Small bits of metadata make tasks easier to sort

Labels

Kind of work: data, figure, bug, writing, question.

Assignees

Who is responsible for the next action?

Milestones

Group work for a deadline, assignment, poster, or manuscript.

Projects

Projects turn issues into a work board

Backlog

Download updated GBIF recordsdata
Choose climate predictorsanalysis

In progress

Clean duplicate coordinatesnotebook 03
Draft methods textwriting

Done

Create repository READMEdocumentation
Pull requests

A pull request is a proposed change with discussion

You do not need to master pull requests on day one.

But they are useful when collaborators want to review changes before merging them into the main project.

  • Summarize what changed
  • Show line-by-line differences
  • Ask for feedback
  • Merge when ready
Branches

A branch is a safe workspace for a change

Main branch

  • Stable current version
  • What collaborators expect to run
  • Protect this from half-finished edits

Working branch

  • Try a new analysis
  • Revise a figure
  • Fix a broken script

For solo class work, commits on main may be enough. For collaboration, branches become more useful.

Releases, citations, licenses

Make a project easier to cite and reuse

Release

A named version of your repository, such as the analysis used for a manuscript.

CITATION.cff

Tells others how to cite your code or project.

LICENSE

States what others are allowed to do with your code.

What not to commit

GitHub is not the right place for everything

SecretsPasswords, tokens, private keys
Sensitive dataHuman subjects, protected locations, permits
Huge filesLarge rasters, videos, raw archives
Generated clutterCaches, temporary files, system files

Use `.gitignore` to keep files out of the repository.

A biology-friendly workflow

Start simple and build habits gradually

READMEExplain the project and folder structure
→
Commit oftenSmall checkpoints with meaningful messages
→
Track tasksUse issues and a project board for next steps
Takeaways

GitHub helps future you understand present you

  1. Repositories organize the files and history for an analysis.
  2. Commits create named checkpoints.
  3. Issues capture tasks, bugs, questions, and decisions.
  4. Projects turn scattered tasks into a visible plan.
  5. README files make your work easier to rerun and share.

Use the features that solve real research problems. You do not need all of GitHub at once.