Git & GitHub
Learn Git and GitHub from scratch: commits, branches, merging and conflicts, rebasing, remotes, SSH keys, pull requests, open-source contributions, releases, team workflows and recovering from mistakes — 16 hands-on lessons where every command shows its real output.
Start Learning →What Is Git?
Git is a free, open-source version control system: it records every change to a project, lets you go back to any earlier version, and lets many people work on the same code at once without overwriting each other. It was created by Linus Torvalds in 2005 for the Linux kernel, and today it is used by almost every software team in the world.
GitHub is the most popular place to host Git repositories online. It adds the collaboration layer on top of Git — pull requests for code review, issues, automation with GitHub Actions and free hosting with GitHub Pages — and it doubles as the portfolio employers look at. This course teaches both: Git on your own computer first, then GitHub for sharing and teamwork.
Every command in this course was actually run, and every output box shows exactly what Git printed — commit IDs included. You follow one learner, Priya, as she builds and manages her portfolio website from the first commit to her first open-source pull request.
Where Is Git Used?
Software Teams
Every kind of development team — web, mobile, backend, games — uses Git to track and combine its work.
Open Source
Linux, Python, React and VS Code are all built in public Git repositories with pull requests from contributors worldwide.
Cloud & DevOps
Infrastructure, configuration and deployment pipelines live in Git, and pushing code triggers automated builds and deployments.
Data & Documentation
Data scientists version their code and notebooks, and technical writers keep documentation in Git alongside the code.
Why Learn Git?
Career
- Listed as a required skill in almost every developer job description
- Your GitHub profile acts as a public portfolio for recruiters
- Interviews and take-home tasks are often submitted as GitHub repositories
- A foundation for DevOps, cloud and CI/CD roles
Safety
- Undo almost any mistake, from a stray edit to a broken commit
- Experiment on branches without risking your working version
- Every pushed commit is an off-site backup
- Recover “lost” work with the reflog
Teamwork
- Work on the same project as others without overwriting their changes
- Review code through pull requests before it goes live
- Understand exactly who changed what, and why
- Contribute to open-source projects you use every day
Universal
- Works with every programming language and kind of file
- Runs on Windows, macOS and Linux
- The same commands work with GitHub, GitLab and Bitbucket
- Built into VS Code and every major editor
Code Example
Here is the everyday Git loop you will master in this course — create a repository, stage a file and save it as a commit:
git initgit add index.htmlgit commit -m "Add home page"git log --onelineClick Run to see what this code prints.
git init creates the repository, git add stages the file, git commit saves a snapshot with a unique ID (55024d8), and git log shows the history. Lessons 3 and 4 walk through every line of this output.
Course Curriculum
Follow these 16 lessons in order. Lessons 1–6 cover Git on your own computer, lessons 7–9 branching, merging and rebasing, lessons 10–13 GitHub and collaboration, and lessons 14–16 releases, team workflows and recovery.
You only need to be comfortable creating and editing files. The example project is a tiny HTML website, but you do not need to know HTML — you can follow along with any files you like.
Projects You'll Build
Put your Git skills to work with these hands-on projects — each one is a complete, step-by-step tutorial:
Publish a Portfolio with GitHub Pages
Create a repository, push a small website and publish it for free at your-username.github.io, then ship an update with a pull request.
Team Collaboration Simulation
Play two developers on two clones of one repository: parallel feature branches, a rejected push, a real merge conflict and a clean resolution.
Your First Open-Source Contribution
Fork a practice repository, keep it in sync with upstream, make a change on a branch and open a pull request to the original project.
Git History Detective
Generate a repository with a hidden bug, then track it down with git log, git blame and an automated git bisect — and fix it with git revert.
Frequently Asked Questions
Yes. Every lesson and project is free, with no sign-up. Git itself and a GitHub account are free too.
No. Git works with any files. Knowing a little HTML or any programming language helps you relate to the examples, but it is not required.
The command line. It works everywhere, every error message and tutorial uses it, and it makes graphical tools like the VS Code Git panel easy to understand.
Git is the version control program on your computer; GitHub is a website that hosts Git repositories and adds collaboration features. Lesson 1 explains it in detail.
Yes. Every command was run with Git 2.55, and each output box shows exactly what it printed. On Windows you may additionally see a harmless line-ending notice, explained in lesson 2.
Key Takeaways & Summary
- Git tracks the history of a project; GitHub hosts repositories and adds collaboration.
- You will learn commits, history, undoing, .gitignore, branches, merging, conflicts and rebasing.
- You will put projects on GitHub, connect securely with SSH, and work through pull requests.
- You will contribute to open source, tag releases, follow team workflows and recover from mistakes.
- Every lesson includes interactive challenges, and every command shows its real output.
Begin with Lesson 1, then follow along in a terminal — creating the same repository as Priya is the fastest way to make Git feel natural.