Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Understanding Git & GitHub: Branching, Merging, Rebase & PRs
Rating: 4.7 out of 5(7 ratings)
49 students

Understanding Git & GitHub: Branching, Merging, Rebase & PRs

Master Git from the building blocks up. Branching, merging, rebase, GitHub pull requests, Actions, and team workflows.
Created byKian Attar
Last updated 6/2026
English
English [Auto],

What you'll learn

  • Resolve merge conflicts confidently using the three-way merge model — without trial-and-error or panic
  • Rebase commits cleanly and recover safely with ORIG_HEAD when something goes wrong
  • Open pull requests on GitHub that pass code review on the first try
  • Configure GitHub Actions workflows that run automated tests and checks on every pull request
  • Build a working mental model of Git's object system — blobs, trees, commits, and references
  • Apply Git's three-tree model (work tree, index, HEAD) to predict what any Git command will do before you run it
  • Recover any "lost" commit using the reflog — broken resets, force-pushes, deleted branches
  • Sign commits with SSH keys to prove your identity and prevent impersonation on GitHub
  • Force-push safely with --force-with-lease without overwriting your teammates' work
  • Contribute to open-source projects using the fork-and-pull-request workflow
  • Set up branch protection rules to enforce code review and prevent direct pushes to main
  • Direct AI coding tools confidently — knowing what to ask, what to verify, and when to push back

Course content

11 sections • 66 lectures • 11h 48m total length
  • Watch on YouTube: https://www.youtube.com/watch?v=YgDYvSYtJ3w0:04

    Link → https://www.youtube.com/watch?v=YgDYvSYtJ3w

Requirements

  • A computer with internet access — Mac, Windows, or Linux (Windows users will use Git Bash, which the course shows how to set up)
  • Basic familiarity with using a terminal — the course reviews terminal setup and recommends Starship in Section 1
  • No prior Git or version control experience required — the course starts from the building blocks up
  • No prior GitHub experience required — you'll create your free account and your first repository during the course
  • A free GitHub account (signup is walked through in the course)
  • VS Code as your code editor (free, used throughout — the course shows installation and setup)
  • All tools and platforms used in the course are free — Git, GitHub free tier, GitHub CLI, VS Code, and the GitHub Actions free quota

Description

You’ll build a complete understanding of Git and GitHub — how Git actually stores your work, how branches and merges happen under the hood, how collaboration breaks, and how to fix it. No memorization. No command cheat sheets you’ll forget by next week. Just a foundation that finally makes sense.

Finally understand Git — and the team workflows it lives inside.

  • Build a real mental model of how Git stores your project — blobs, trees, commits, references

  • Use branching, merging, and rebasing with confidence instead of dread

  • Recover from any mistake — broken resets, force-push disasters, “lost” commits — using the reflog

  • Collaborate on GitHub like a senior engineer — pull requests, Actions, signed commits, forks, organizations

  • Make Git decisions that save your whole team time, not just your own

  • Direct AI coding tools confidently, instead of being directed by them

Practice in every section — hands-on labs, scripted collaboration scenarios, real .git folders inspected by hand, live GitHub workflows.

Git isn’t just a list of commands. It’s a system for managing history — and learning it the right way changes how you collaborate forever.

Git is the version control system that every working developer uses — Linux, Python, React, every open-source project on Earth, and almost certainly the codebase at your next job. Every developer, every code review, every deployment touches it. But most Git courses treat it like a vocabulary list — memorize the commands, learn the syntax, move on. That works until something diverges. A merge conflict you can’t read. A push that gets rejected. A reset that seems to delete your work.

Then you’re guessing — pasting commands into AI and hoping, reading documentation that doesn’t quite click. This course doesn’t teach commands. It teaches the system those commands live inside — and once you see that system, Git stops being something you memorize. It becomes something you understand.

How is this course different?

Most Git courses start with git init. This one starts with the building blocks.

Before you ever run git push, you’ll have already opened .git/objects by hand and watched Git create a blob, a tree, and a commit in front of you. By the time you reach branching, you already know that a branch is just a text file with a commit hash inside. By the time you reach rebase, you already know exactly why your commit hashes change. Every concept is built from the components beneath it — and once it’s built, you don’t need to memorize anything.

Then we keep going:

Section 2 — Foundations. How Git thinks about your project. How to read Git’s documentation without getting lost in the synopsis notation. How to learn Git in the age of AI — what’s your job, what’s the AI’s job, and why the line between them is the most valuable skill in modern engineering.

Section 3 — The Three Objects: Blobs, Trees, and Commits. Where every other course says “Git stores your project as commits,” you’ll actually run git cat-file and see the binary objects Git just made. Hash, blob, tree, commit — by the end of this section, “Git is content-addressable storage” stops being a phrase and becomes something you see.

Section 4 — The Three References: HEAD, Branches, and Tags. A branch is a file. So is HEAD. So is a tag. Once you see this, attached vs detached HEAD, lightweight vs annotated tags, the whole reference system clicks. You’ll never lose a commit to a bad reset again — because you’ll know exactly where it went.

Section 5 — The Three Trees: Work, Index, and HEAD. This is the model that makes git add, git restore, git reset --soft/--mixed/--hard finally make sense. Three stages, one unifying pattern. By the end you’ll predict what any of these commands does before you run it.

Section 6 — Working with References. Managing branches and tags safely. Resetting branches in all three modes. Recovering “lost” commits with the reflog — the safety net every developer should know about and most don’t.

Section 7 — Combining Changes. Fast-forward and three-way merges, what merge conflicts actually are at the level of overlapping changes, and git stash as a temporary pause button you can apply later.

Section 8 — Rebase. Interactive rebase. The to-do list. Pick, squash, reword, drop. Why commit hashes change. How to undo a rebase. And the eternal question — merge vs rebase — settled by team context rather than dogma.

Section 9 — Git in Teams. A full collaboration simulation with multiple developers — you, Bob, John, Hans — working on the same project on different computers. Your push gets rejected. Someone force-pushes. You recover with --force-with-lease. The section ends with a lesson nobody else teaches: developer velocity — the math showing how one thoughtful Git decision saves 150+ minutes across a five-person team. That kind of judgment is what separates working developers from senior engineers.

Section 10 — GitHub end-to-end. Framed as the six problems plain remotes don’t solve: access control, branch protection, code review, automation, identity verification, and scaling collaboration. You’ll set up branch protection rules. Open and review pull requests. Build a GitHub Actions workflow from scratch that runs on every PR. Sign commits with SSH keys to prove your identity. Plan work with issues, milestones, and projects. Contribute to someone else’s project via the fork-and-PR workflow. Transfer a personal repo into a GitHub Organization with team roles.

Every concept arrives as the answer to a problem you’ve already felt. Git’s internals aren’t shown to you as trivia — they’re built from first principles. Merge conflicts aren’t described — you experience them, then resolve them. Force-push disasters aren’t a warning — you fix one in real time using --force-with-lease.

By the end, you’re not repeating commands you copied. You’re reasoning about a system you understand.

Why does this matter in the AI era?

AI writes Git commands well. That’s not the problem — your ability to direct it is.

If you don’t understand how Git stores history, you can’t ask AI for the right kind of fix when something breaks — and you won’t notice when it suggests something destructive. If you don’t understand what a rebase actually does to commit hashes, you can’t trust AI’s “just force-push it” suggestion. If you don’t understand collaboration etiquette, you can’t tell when the AI’s fast solution is going to cost 30 minutes of confusion for five teammates.

AI is only as good as the person driving it. This course makes you that person — someone who knows what to ask, what to verify, and when to push back on what the AI just handed you.

What’s inside

  • 10 sections, 60+ lectures that build on each other from the building blocks to fluent team workflow

  • Hands-on labs in every section — real .git folders, scripted multi-developer scenarios, live GitHub workflows

  • Real-world demos — recover orphan commits with the reflog, fix a force-push with --force-with-lease, automate checks on every pull request with GitHub Actions, sign commits with SSH keys, contribute via fork-and-PR with real maintainers

  • Git’s official documentation and GitHub’s docs as your toolkit — by the end you can pick up any new command or feature on your own

  • Every tool used is free — VS Code, Git, GitHub free tier, GitHub CLI

What you’ll walk away with

  • A complete working knowledge of Git — every core object, reference, tree, and operation a working developer uses

  • A real mental model of collaboration — push, fetch, pull, rebase strategy, force-push recovery, and the etiquette of shared history

  • The ability to read and write Git workflows for any team — including the messy one you’ll inherit at your next job

  • A reusable approach for picking up any new Git or GitHub feature — using docs and AI like a developer, not a memorizer

  • The foundation that makes every advanced workflow click into place — CI/CD, code review at scale, monorepos, GitOps, deployment pipelines

  • A real GitHub repository with branch protection, automated workflows, signed commits, and a portfolio-ready contribution history

Q&A and support

If you have a question along the way, post it in the course Q&A. I respond to most questions within 24 hours (weekends excluded) and read every single one.

The goal is not to cover material. It’s to change how you see version control.

Once you see it clearly, Git stops feeling like trivia to memorize. Collaboration stops being scary. Every team tool you’ll ever touch — CI/CD, code review, deployment pipelines, GitOps — becomes easier, because they all sit on top of the foundation you just built.

This course uses AI assistants (such as ChatGPT) in a few demonstrations to model real-world developer workflow. The course content, narration, and structure were created by the instructor. AI is treated as a tool, not a replacement for understanding.


Click Enroll, and let’s finally make Git click.


Who this course is for:

  • Self-taught developers who use Git daily but feel uncertain every time something goes wrong
  • Bootcamp graduates and computer science students preparing for their first engineering job
  • Career changers who want to walk into their first developer role already comfortable with Git and GitHub
  • Working engineers who have been faking it on Git for years and want to finally understand what they're doing
  • Designers, data scientists, and product managers who collaborate with engineering teams on GitHub and want a real working grasp of the workflow
  • Anyone who has tried Git before, bounced off the documentation, and is ready to learn it the right way