Learn Git from scratch: version control basics, branching, merging, rebasing, remotes, GitHub workflow, and advanced techniques — with hands-on examples and quizzes.
17 lessons in this tutorial
Learn what Git is, why version control matters, and how distributed version control helps teams work safely and efficiently.
Install Git on macOS, Linux, and Windows, then configure your identity, editor, and default branch for a clean first setup.
Learn the everyday Git workflow with init, clone, status, add, commit, log, and diff using practical beginner-friendly examples.
Understand Git branches, HEAD, switching branches, deleting branches, and detached HEAD with practical beginner examples.
Learn fast-forward merges, three-way merges, merge conflicts, and why teams sometimes use git merge --no-ff.
Learn what rebase does, how interactive rebase works, when to squash commits, and how rebase compares with merge.
Learn how Git remotes work, including add, remove, fetch, pull, push, tracking branches, and upstream configuration.
Learn how to temporarily save unfinished work with stash, including apply, pop, drop, list, named stashes, and untracked files.
Learn how to use restore, reset, revert, and clean safely, and understand the difference between undoing local work and undoing shared history.
Learn how Git tags work, including annotated and lightweight tags, pushing tags, deleting tags, and checking out a tag.
Learn a practical GitHub workflow using forks, clones, feature branches, pull requests, code review, and squash and merge.
Explore useful advanced Git tools including cherry-pick, bisect, reflog, submodules, hooks, and aliases for smarter daily workflows.
Learn how Git hooks automate checks before commits and pushes, and how tools like Husky make hooks shareable across teams.
Compare GitFlow, GitHub Flow, and Trunk-Based Development so you can choose a branching model that fits your team and delivery style.
Set up Git configuration, useful aliases, and a global ignore file so your daily workflow is faster and more consistent.
Learn what Git submodules are, how to add and update them, and when alternatives like subtree or package managers may be easier.
Write clearer Git commit messages using proven rules, Conventional Commits, and tools that support changelogs and releases.