DevOpsLesson
DevOpsLesson

Free, comprehensive DevOps tutorials and learning roadmaps. Master Docker, Kubernetes, CI/CD, and more.

Stay Updated

Get notified about new tutorials and features.

Tutorials

  • What is DevOps?
  • Docker Tutorial
  • Terraform Tutorial
  • CI/CD Pipeline
  • All Tutorials

Roadmaps

  • DevOps Engineer
  • Cloud Engineer
  • SRE Path
  • All Roadmaps

Company

  • About Us
  • Blog
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 DevOpsLesson. All rights reserved.

Tutorial

Git Tutorial

Learn Git from scratch: version control basics, branching, merging, rebasing, remotes, GitHub workflow, and advanced techniques — with hands-on examples and quizzes.

Start Learning

17 lessons in this tutorial

1

Introduction to Git

Learn what Git is, why version control matters, and how distributed version control helps teams work safely and efficiently.

2

Installing Git

Install Git on macOS, Linux, and Windows, then configure your identity, editor, and default branch for a clean first setup.

3

Git Basics

Learn the everyday Git workflow with init, clone, status, add, commit, log, and diff using practical beginner-friendly examples.

4

Git Branching

Understand Git branches, HEAD, switching branches, deleting branches, and detached HEAD with practical beginner examples.

5

Git Merging

Learn fast-forward merges, three-way merges, merge conflicts, and why teams sometimes use git merge --no-ff.

6

Git Rebasing

Learn what rebase does, how interactive rebase works, when to squash commits, and how rebase compares with merge.

7

Git Remote

Learn how Git remotes work, including add, remove, fetch, pull, push, tracking branches, and upstream configuration.

8

Git Stash

Learn how to temporarily save unfinished work with stash, including apply, pop, drop, list, named stashes, and untracked files.

9

Undoing Changes in Git

Learn how to use restore, reset, revert, and clean safely, and understand the difference between undoing local work and undoing shared history.

10

Git Tagging

Learn how Git tags work, including annotated and lightweight tags, pushing tags, deleting tags, and checking out a tag.

11

GitHub Workflow with Git

Learn a practical GitHub workflow using forks, clones, feature branches, pull requests, code review, and squash and merge.

12

Advanced Git

Explore useful advanced Git tools including cherry-pick, bisect, reflog, submodules, hooks, and aliases for smarter daily workflows.

13

Git Hooks

Learn how Git hooks automate checks before commits and pushes, and how tools like Husky make hooks shareable across teams.

14

Git Workflows

Compare GitFlow, GitHub Flow, and Trunk-Based Development so you can choose a branching model that fits your team and delivery style.

15

Git Aliases and Configuration

Set up Git configuration, useful aliases, and a global ignore file so your daily workflow is faster and more consistent.

16

Git Submodules

Learn what Git submodules are, how to add and update them, and when alternatives like subtree or package managers may be easier.

17

Git Commit Messages

Write clearer Git commit messages using proven rules, Conventional Commits, and tools that support changelogs and releases.