Donate
Back to Introduction to Web Development
Sign in to save your progress and earn a certificate.

Module 7: Version Control with Git & GitHub

Learning Objectives
  • Explain the difference between Git and GitHub
  • Use basic Git commands: add, commit, and push
  • Describe the purpose of branches in collaborative projects

Git is version control software that runs on your own computer and tracks every change made to a project's files over time, letting you save checkpoints called commits and revert to an earlier state if something breaks. GitHub is a separate, web-based platform that hosts Git repositories online, making it possible to back up code remotely, share it publicly or privately, and collaborate with other developers -- the core everyday commands are git add to stage changes, git commit to save a checkpoint with a message, and git push to upload those commits to GitHub. Branches let a developer work on a new feature or fix in an isolated copy of the project without affecting the main, working version of the code, and are later merged back in once the change is tested -- this workflow is standard practice at essentially every professional software company and most open-source projects.

Module Quiz

1. Which Git command uploads your saved commits to a remote repository like GitHub?

2. What is the key difference between Git and GitHub?

3. A Git branch is primarily used to: