Lesson 313 lessons

GitHub in Practice — Repos, Commits, Pull Requests

A repo is one project's home on GitHub

A "repository" (repo) holds all the code, history, and settings for one project. Each repo has a main branch (often called main), which is typically the official, working version of the code.

Commits: labeled save points

A "commit" is a saved snapshot of changes with a short message describing what changed ("fix login bug", "add dark mode"). Over a project's life, this creates a complete, searchable history of every change and who made it.

Pull requests: proposing a change before it's accepted

A "pull request" (PR) proposes merging changes from one branch into another — typically used so a teammate (or an automated check) can review the change before it becomes part of the official code. This is the core collaboration workflow behind almost every team software project.

Key Takeaways

  • A repo holds all the code, history, and settings for one project.
  • A commit is a labeled save point describing what changed.
  • A pull request proposes merging a change so it can be reviewed before becoming official.
  • This commit + pull request workflow is the backbone of nearly all team software collaboration.

Read a real pull request

Visit any public GitHub repo (like github.com/vercel/next.js), click the 'Pull requests' tab, and open one to see how a real proposed change looks with its description and file changes.