git

    Git Course

    Master professional version control, Git workflows, collaboration systems, GitHub engineering & production development practices.

    120
    Lessons
    8
    Modules
    0/120
    Completed

    Architecture

    Git Commit Lifecycle

    From a developer's edit to remote collaboration — through working directory, staging area, local repo and remote.

    Working Dir
    edits
    git add
    Staging
    index
    git commit
    Local Repo
    .git
    git push
    Remote
    GitHub
    Team
    collab
    Branching
    feature · main · release
    Pull Request
    review → merge
    Merge / Rebase
    linear vs graph
    CI/CD
    Actions · pipelines
    Curriculum

    Enterprise learning path

    8 modules · 120 lessons

    Git Fundamentals

    0/15 complete
    1. 1
      Git Home
      Next up

      Welcome to the complete Git course — your roadmap from absolute beginner to a confident, production-grade version control engineer who ships safely every day.

    2. 2
      Introduction to Version Control

      Version control is a system that records every change to your files so you can travel back in time, compare versions, and collaborate with teammates without overwriting each other.

    3. 3
      What is Git?

      Git is a fast, distributed version control system created by Linus Torvalds in 2005 to manage the Linux kernel — every developer keeps a full copy of the project history on thei…

    4. 4
      Why Developers Use Git

      Git is used by 95% of professional developers because it lets teams branch fearlessly, review changes line-by-line, automate testing on every push, and roll back instantly when…

    5. 5
      Installing Git

      Installing Git takes under two minutes on macOS, Windows or Linux and gives you the same command-line tool used inside GitHub, GitLab, Bitbucket and Azure DevOps.

    6. 6
      Git Configuration

      Git configuration sets your identity, default branch name, editor, alias shortcuts and merge tool — values stored in ~/.gitconfig that follow you across every repository.

    7. 7
      Initializing Repositories

      Running git init creates a hidden .git folder that turns any directory into a fully tracked Git repository ready for its first commit.

    8. 8
      Working Directory Explained

      The working directory is the regular folder on disk where you actually edit files — Git watches it and reports which files have changed since the last commit.

    9. 9
      Git Staging Area

      The staging area (also called the index) is a draft of your next commit — a place to carefully assemble exactly which changes belong together before you snapshot them.

    10. 10
      Creating Commits

      A commit is an immutable snapshot of your staged changes plus a message, an author, a timestamp and a parent — together they form the chain that is your project history.

    11. 11
      Git Status

      git status is the most-typed Git command in the world — it answers: which files changed, which are staged, and what branch am I on?

    12. 12
      Git Log

      git log walks the commit chain backwards from HEAD, showing who shipped what and when — essential for code archaeology and incident investigation.

    13. 13
      Undoing Changes

      Undo in Git is layered: restore undoes file edits, reset moves the branch pointer, and revert safely creates an inverse commit on shared history.

    14. 14
      Git Ignore

      .gitignore tells Git which files (build outputs, secrets, node_modules, .env) to never track — protecting both your repository size and your security.

    15. 15
      Git Best Practices

      Best practices like Conventional Commits, short-lived branches, atomic commits and signed commits separate hobby repositories from production-grade engineering.

    Git Branching

    0/15 complete
    1. 16
      Introduction to Branching

      A branch in Git is just a tiny pointer to a commit — creating one is instantaneous and lets you explore an idea without disturbing main.

    2. 17
      Creating Branches

      git branch feature/login and git switch -c feature/login create a new branch — the second also moves you onto it in one step.

    3. 18
      Switching Branches

      git switch replaces the older git checkout for moving between branches — Git updates your working directory to match that branch's snapshot.

    4. 19
      Branch Workflow

      A clean branch workflow is: pull main, branch off, commit small chunks, push, open a PR, react to review, merge — repeat several times a day.

    5. 20
      Feature Branching

      Feature branching means every change — even a one-line typo fix — gets its own short-lived branch so it can be reviewed and tested in isolation.

    6. 21
      Merge Basics

      git merge combines two branch histories into one — Git either fast-forwards the pointer or creates a merge commit with two parents.

    7. 22
      Fast Forward Merge

      A fast-forward merge happens when main hasn't moved since you branched — Git just slides the pointer forward, leaving a perfectly linear history.

    8. 23
      Merge Conflicts

      A merge conflict happens when two branches change the same lines — Git inserts markers and asks you to choose.

    9. 24
      Conflict Resolution

      Resolving conflicts means reading both sides, picking what should survive, deleting the markers, then git add the file and committing to complete the merge.

    10. 25
      Git Rebase Basics

      git rebase replays your commits on top of another branch's tip — producing a clean, linear history at the cost of rewriting commit SHAs.

    11. 26
      Cherry Picking

      git cherry-pick copies a single commit from one branch onto another — perfect for back-porting a bug fix from main to a release branch.

    12. 27
      Stashing Changes

      git stash shelves your work-in-progress so you can switch branches with a clean tree, then pop it back later.

    13. 28
      Branch Cleanup

      Deleting merged branches with git branch -d and pruning stale remotes with git fetch --prune keeps your team's branch list readable.

    14. 29
      Branch Naming Conventions

      Naming branches feature/*, fix/*, hotfix/*, release/* tells humans and CI bots exactly how to treat the branch.

    15. 30
      Enterprise Branch Strategies

      Strategies like Git Flow, GitHub Flow and Trunk-Based Development each trade off release cadence vs branch complexity — pick one and document it.

    Git Collaboration

    0/15 complete
    1. 31
      Team Collaboration Basics

      Collaboration with Git means everyone holds a full copy of history and synchronises through a shared remote — usually GitHub or GitLab.

    2. 32
      Git Pull

      git pull is shorthand for git fetch + git merge (or --rebase) — it brings your branch up to date with the remote.

    3. 33
      Git Push

      git push uploads your local commits to the remote and updates the remote branch pointer — the moment your teammates can see your work.

    4. 34
      Git Fetch

      git fetch downloads new commits from the remote without touching your working directory — letting you inspect changes before merging.

    5. 35
      Pull Requests

      A pull request is a hosted conversation around a topic branch: discussion, line-by-line review, automated CI checks and a final merge button.

    6. 36
      Code Reviews

      Code review is where engineering culture lives — it catches bugs, spreads knowledge, and gives juniors a structured place to learn from seniors.

    7. 37
      Forking Repositories

      A fork is your own server-side copy of someone else's repository — the standard pattern for contributing to open source projects you don't have write access to.

    8. 38
      Open Source Workflow

      The open source workflow is fork → branch → commit → push → pull request — millions of contributions to React, Vue, Linux and Kubernetes follow this exact path.

    9. 39
      Team Development Workflow

      A healthy team workflow combines short branches, fast PRs, green CI, automated deploys and observable production — Git sits at the heart of all of it.

    10. 40
      Git Collaboration Strategies

      Squash, rebase, merge commits, protected branches, required reviewers and signed commits all combine into a strategy your team agrees on once and lives with daily.

    11. 41
      Pair Programming Workflow

      Pair programming with Git uses the Co-authored-by: trailer in the commit message so both engineers receive credit for the work.

    12. 42
      Git Permissions

      GitHub and GitLab let you grant Read, Triage, Write, Maintain or Admin permissions per team — least privilege keeps production safe.

    13. 43
      Collaboration Best Practices

      Best practices: protect main, require PR reviews, enforce status checks, ban force-push, sign commits, and keep PRs small.

    14. 44
      Handling Large Teams

      Large teams use code owners files, monorepos, ring-based deploys and merge queues to keep hundreds of engineers shipping to the same trunk safely.

    15. 45
      Enterprise Git Collaboration

      Enterprises layer SSO, SAML, audit logs, secret scanning, branch protection and compliance gates on top of Git — making collaboration both fast and safe.

    GitHub & Remote Repositories

    0/15 complete
    1. 46
      Introduction to GitHub

      GitHub is the world's largest Git hosting platform — 100M+ developers use it for code, code review, issues, projects, CI/CD and package hosting.

    2. 47
      Creating GitHub Repositories

      Creating a repository on GitHub takes 30 seconds and gives you a remote URL plus a default main branch ready for your first push.

    3. 48
      Connecting Local & Remote Repositories

      git remote add origin wires your local repo to a remote URL — from then on git push and git pull sync the two.

    4. 49
      SSH Keys

      SSH keys let you push to GitHub without typing a password — generate with ssh-keygen -t ed25519 and paste the public key into your GitHub settings.

    5. 50
      HTTPS Authentication

      Over HTTPS, GitHub now requires a personal access token (PAT) or the GitHub CLI helper instead of your account password.

    6. 51
      GitHub Issues

      Issues are the lightweight tickets where bugs, features and discussions live — every commit can reference an issue with #123 for full traceability.

    7. 52
      GitHub Projects

      GitHub Projects is a flexible kanban / table view that turns issues and PRs into a planning board — agile boards without leaving the repo.

    8. 53
      GitHub Actions Basics

      GitHub Actions runs YAML workflows on every push or PR — perfect for tests, linters, security scans, builds and deploys.

    9. 54
      GitHub Discussions

      Discussions are forum-style conversations attached to a repository — the right home for Q&A, RFCs and community announcements.

    10. 55
      GitHub Releases

      Releases are tagged snapshots of your code with notes and downloadable assets — the way semver versions like v1.4.0 reach your users.

    11. 56
      Repository Management

      Repository management covers settings, secrets, environments, branch protection, code owners and webhooks — the levers that turn a repo into a product.

    12. 57
      Open Source Contributions

      Contributing to open source teaches you to read large codebases, follow community style guides, and engage respectfully with maintainers in PR reviews.

    13. 58
      GitHub Security

      GitHub Advanced Security adds secret scanning, Dependabot, CodeQL static analysis and signed commits — all driven by Git history.

    14. 59
      Repository Optimization

      Optimization means small clones, shallow fetches, Git LFS for binaries, archived old branches and a clear CODEOWNERS file.

    15. 60
      Real GitHub Workflows

      Real workflows combine PRs, Actions, Environments, required reviewers and merge queues — exactly how Vercel, Stripe and Shopify ship to production.

    Advanced Git Workflows

    0/15 complete
    1. 61
      Git Flow Workflow

      Git Flow uses long-lived develop, release/* and hotfix/* branches around main — great for products with scheduled releases.

    2. 62
      Trunk-Based Development

      Trunk-based development means short branches and many merges per day to a single main trunk — the model used by Google, Facebook and most SaaS companies.

    3. 63
      Monorepo Strategies

      A monorepo holds many projects in one Git repo — tools like Nx, Turborepo and Bazel make builds, tests and deploys scale across thousands of packages.

    4. 64
      Semantic Versioning

      Semantic Versioning (MAJOR.MINOR.PATCH) communicates breaking, additive and bug-fix changes — automated by tools like semantic-release driven from commit messages.

    5. 65
      Release Management

      Release management turns a sequence of merged PRs into a versioned, tagged, documented release — usually automated end-to-end.

    6. 66
      CI/CD Integration

      Continuous Integration runs tests on every push; Continuous Deployment ships every green commit to production — Git is the trigger and the audit log.

    7. 67
      Automated Deployments

      Automated deploys push your code from a green CI run to staging or production with zero human steps — and roll back automatically if health checks fail.

    8. 68
      Git Hooks

      Git hooks are scripts in .git/hooks that run at lifecycle events — pre-commit, commit-msg and pre-push enforce style and tests locally.

    9. 69
      Interactive Rebase

      git rebase -i lets you reorder, squash, edit or drop commits on a branch — the power tool for cleaning up history before a PR lands.

    10. 70
      Squashing Commits

      Squashing collapses many WIP commits into one tidy commit — most teams squash on merge so main reads like a clean changelog.

    11. 71
      Bisect Debugging

      git bisect performs a binary search over your commit history to find the exact commit that introduced a bug — minutes instead of hours.

    12. 72
      Git Submodules

      Submodules embed one Git repo inside another at a pinned SHA — useful for shared libraries, but heavier than monorepos or package managers.

    13. 73
      Git Tags

      Tags are immutable named pointers to specific commits — annotated tags also carry a message and a signature, ideal for releases.

    14. 74
      Deployment Workflows

      Deployment workflows like blue/green, canary and rolling all use Git tags or branches as the source of truth for what is live where.

    15. 75
      Enterprise Git Architecture

      Enterprise architectures combine self-hosted GitHub Enterprise, mirror caches, runners and policy engines to serve thousands of developers globally.

    Git Internals & Optimization

    0/15 complete
    1. 76
      How Git Works Internally

      Internally Git is a content-addressed snapshot store — every file, directory and commit is keyed by the SHA of its content.

    2. 77
      Git Objects

      Git has four object types: blob (file), tree (directory), commit (snapshot) and tag — together they form the entire history.

    3. 78
      Blobs, Trees & Commits

      A commit points to one tree (the root directory snapshot); each tree points to blobs (files) and sub-trees — a recursive snapshot at every commit.

    4. 79
      SHA Hashing

      Git uses SHA-1 (migrating to SHA-256) to address every object — change one byte and the SHA changes, which is why history is tamper-evident.

    5. 80
      Git Storage Architecture

      Git stores loose objects in .git/objects/xx/yyyy...

    6. 81
      Pack Files

      Pack files are zlib-compressed bundles of related objects with delta compression — they shrink a 100MB checkout into a few MB on disk.

    7. 82
      Performance Optimization

      Performance tricks include partial clones, sparse checkouts, commit-graph files and the file system monitor — essential at monorepo scale.

    8. 83
      Large Repository Management

      Large repos benefit from Git LFS for binaries, scalar enlistments, sparse-checkout and shallow clones — Microsoft uses these on a 300GB Windows monorepo.

    9. 84
      Git Garbage Collection

      git gc repacks loose objects, prunes unreachable ones older than two weeks, and rewrites the reflog — keeping repositories fast over years of use.

    10. 85
      Debugging Git Problems

      Debug Git issues with GIT_TRACE=1, git fsck, git reflog and git cat-file — the same tools support engineers use.

    11. 86
      Recovering Lost Commits

      Use git reflog to find any commit you've ever had checked out, then git switch -c rescue to bring it back as a branch.

    12. 87
      Git Security Practices

      Sign commits with GPG or sigstore, scan for secrets pre-commit, ban force-push to main, and require 2FA on every contributor account.

    13. 88
      Backup Strategies

      Mirror clones (git clone --mirror) plus offsite encrypted snapshots give you bulletproof Git backups even if GitHub goes down.

    14. 89
      Repository Scaling

      Scaling a repo means commit-graph caches, parallel fetch, pack file partitioning and a CDN-fronted Git server — all transparent to the developer.

    15. 90
      Production Git Systems

      Production Git systems run behind load balancers, with mirror caches per region, audit logs streamed to SIEM, and health checks driving auto-failover.

    Real-World Git Engineering

    0/15 complete
    1. 91
      Git in Enterprise Teams

      Enterprise teams pair Git with SSO, audit logs, signed commits and CODEOWNERS so hundreds of engineers can ship safely against the same trunk.

    2. 92
      SaaS Development Workflow

      Modern SaaS teams branch off main, ship dozens of PRs per day, deploy automatically on merge, and roll back via Git revert if metrics drop.

    3. 93
      Frontend Team Collaboration

      Frontend teams pair Git with Storybook, Chromatic visual reviews and preview deploys per PR — every change visible before merge.

    4. 94
      Backend Team Workflow

      Backend teams add database migration files, contract tests and feature flags to every Git branch so risky changes can be released dark first.

    5. 95
      Full Stack Development Workflow

      Full-stack workflows synchronise frontend and backend changes inside a single PR using monorepos and atomic version bumps.

    6. 96
      Agile Development with Git

      Agile sprints map naturally to Git: each user story becomes a branch, each PR a deliverable, each tag a release — all visible on the project board.

    7. 97
      DevOps & Git Integration

      DevOps treats Git as the single source of truth — Infrastructure-as-Code, GitOps and ArgoCD all reconcile production from Git commits.

    8. 98
      Release Engineering

      Release engineers own the train: tagging versions, generating changelogs from commits, and orchestrating staged rollouts driven by Git tags.

    9. 99
      Hotfix Workflow

      A hotfix branches from the production tag, applies the smallest possible fix, ships through expedited CI and is then merged back into main.

    10. 100
      Incident Recovery Workflow

      During an incident, git revert on the bad merge plus a re-deploy is the fastest, safest rollback — no manual file edits needed.

    11. 101
      Multi-Team Collaboration

      Multi-team collaboration uses CODEOWNERS, ring-based deploys, internal forks and merge queues to keep dozens of teams unblocked.

    12. 102
      Startup Engineering Workflow

      Startups stay lean with trunk-based development, GitHub Actions, Vercel previews and one-click rollbacks — Git is the entire ops department.

    13. 103
      Open Source Engineering

      Open source engineers maintain healthy projects with issue templates, contribution guides, signed commits, semantic-release and welcoming reviews.

    14. 104
      Production Release Pipeline

      A production release pipeline turns every green merge to main into a versioned tag, container image, deploy and changelog — fully driven by Git.

    15. 105
      Enterprise Collaboration Systems

      Enterprise systems integrate Git with Jira, ServiceNow, Slack and SSO so every commit, PR and deploy is auditable end-to-end.

    Practice & Interview Preparation

    0/15 complete
    1. 106
      Git Exercises

      Hands-on exercises: initialise a repo, stage selectively, write a Conventional Commit message, push, open a PR and merge it — repeat until automatic.

    2. 107
      Branching Challenges

      Branching challenges: rebase a feature onto a moving main, cherry-pick a fix into a release, and split one big commit into three using interactive rebase.

    3. 108
      Merge Conflict Challenges

      Merge conflict drills: resolve overlapping line edits, deletes vs renames, and three-way conflicts using git mergetool.

    4. 109
      Collaboration Challenges

      Collaboration drills: review a PR with constructive feedback, request changes, approve, and use the merge queue safely.

    5. 110
      GitHub Challenges

      GitHub-specific drills: write an Actions workflow, protect main, configure required checks, and publish a release with auto-generated notes.

    6. 111
      Git Interview Questions

      Common Git interview questions span working tree vs index vs HEAD, fast-forward vs three-way merge, rebase vs merge, and recovery from force-push.

    7. 112
      Mock Git Interviews

      A mock Git interview asks you to walk through a real scenario at the whiteboard: a teammate force-pushed, CI failed, the prod tag is missing — what now?

    8. 113
      Real-World Git Scenarios

      Real scenarios: rolling back a bad deploy, splitting a monolith, cherry-picking a security patch into three release branches at once.

    9. 114
      Git Workflow Challenges

      Workflow challenges compare Git Flow, GitHub Flow and Trunk-Based Development — pick the right one for a given team size and release cadence.

    10. 115
      Debugging Challenges

      Debugging drills: use git bisect to find a regression, git blame to find an author, and git fsck to recover a corrupted repo.

    11. 116
      Open Source Contribution Tasks

      OSS tasks: fork a project, add a test, run the linter, sign your commits with DCO, open a PR and respond to review feedback.

    12. 117
      Repository Recovery Challenges

      Recovery drills: rescue a deleted branch from reflog, undo a force-push from a teammate's local clone, and restore a lost commit.

    13. 118
      CI/CD Git Tasks

      CI/CD drills: write a workflow that runs on PRs, gate merges on green checks, build and push a Docker image on tag, and deploy to a preview environment.

    14. 119
      Team Collaboration Simulations

      Simulations put you on a 5-engineer team for one sprint — open PRs, review each other's code, resolve conflicts and ship a clean release tag.

    15. 120
      Enterprise Git Assessments

      Enterprise assessments measure your fluency with monorepos, CODEOWNERS, signed commits, audit trails and incident recovery — the senior bar.