Skip to main content
beginner learning path

Git Learning Path

A free, ordered Git path: commits, history, branches, merge conflicts, remotes and pull requests, then fixing mistakes, with simulators and quizzes.

26steps
5stages
~6.5hours

What you will be able to do

  • Explain how commits, branches and the staging area fit together
  • Read history and find the commit that changed a line
  • Merge and rebase, and resolve conflicts without panic
  • Work with remotes and pull requests in a team
  • Undo mistakes safely, before and after you push

9 guide chapters, 9 articles, 3 interview questions, 2 simulators, 1 exercise, 1 quiz, 1 flashcard deck. Every step is free. Tick a step when you finish it, or let the guide, exercise and checklist pages tick it for you.

// your progress

0 / 26 steps

Start the path

Step 1: Git Fundamentals: How Git Works and First Setup

  1. // stage 014 steps · 48 min

    How Git works

    The model behind every Git command, and your first repository.

    1. Guide chapter14 min

      Git Fundamentals: How Git Works and First Setup

      How Git stores snapshots, and the setup you do once.

    2. Guide chapter14 min

      Create a Git Repository: git init, .gitignore, clone

      Create a repository, write a .gitignore and clone one.

    3. Simulator15 min

      Git Concepts Simulator

      Watch the working tree, staging area and commits move as you type.

    4. Interview question5 min

      Git Staging and Committing

      Explain the basics the way an interviewer expects.

  2. // stage 025 steps · 1 h 19 min

    Commits and history

    Record changes with intent, and find out who changed what and why.

    1. Guide chapter19 min

      Git Add, Commit and Diff: Track and Undo Changes

      git add, commit and diff, and how to undo each one.

    2. Article12 min

      Remove a File from Git Without Deleting It, or Undo git add

      Stop tracking a file without deleting it, or take back a git add.

    3. Guide chapter29 min

      Git History: Log, Blame, Bisect, Revert and Reflog

      log, blame, bisect, revert and reflog.

    4. Article9 min

      Git File History: View the Changes Made to a File

      Follow every change made to one file.

    5. Article10 min

      How to Find and Restore a Deleted File in Git

      Find the commit that deleted a file and bring it back.

  3. // stage 035 steps · 1 h 10 min

    Branches and merging

    Work on many things at once and bring them back together.

    1. Guide chapter13 min

      Git Branches: Create, Switch, Stash and Delete

      Create, switch, stash and delete branches.

    2. Guide chapter18 min

      Git Merge and Rebase: Resolve Merge Conflicts

      Merge and rebase, and resolve merge conflicts.

    3. Simulator20 min

      Git Merge Conflict Simulator

      Resolve real conflict markers step by step in the browser.

    4. Interview question5 min

      Git Rebase vs Merge

      Say when you would rebase and when you would merge.

    5. Article14 min

      Undo or Abort a Git Merge, and Resolve Merge Conflicts

      Abort or undo a merge that went wrong.

  4. // stage 045 steps · 1 h 54 min

    Remotes and teamwork

    Share work through a remote and review it in pull requests.

    1. Guide chapter27 min

      Git Remotes: Push, Fetch, Pull and Tracking Branches

      push, fetch, pull and tracking branches.

    2. Article13 min

      How to Push a New Local Branch to Remote Git Repository and Track It

      Push a new branch and set it to track the remote.

    3. Guide chapter19 min

      Git Workflows: Pull Requests, GitHub Flow, Gitflow

      Pull requests, GitHub Flow and Gitflow.

    4. Exercise50 min

      Git Workflow and Collaboration Fundamentals

      Practice a full team workflow with branches and pull requests.

    5. Interview question5 min

      Git Workflow Strategies

      Compare team workflows and their trade-offs.

  5. // stage 057 steps · 1 h 33 min

    Fixing mistakes and good habits

    Undo what went wrong, keep history clean and avoid the traps.

    1. Article13 min

      Delete a Commit from a Git Branch: Reset, Rebase or Revert

      Remove a commit with reset, rebase or revert, and know which is safe after a push.

    2. Article6 min

      How to Undo a Git Rebase with ORIG_HEAD or reflog

      Recover from a rebase with ORIG_HEAD or the reflog.

    3. Article12 min

      How to Squash the Last N Commits and Change Commit Authors in Git

      Squash commits before you open a pull request.

    4. Guide chapter18 min

      Git Best Practices: Commits, Hooks and Signing

      Commit messages, hooks and signed commits.

    5. Article14 min

      A Poisoned .git/config Runs Code on git status. We Tested Which Commands and Copies Carry It

      Why a cloned repository's config can run code, and how to stay safe.

    6. Quiz15 min

      Git Command Quiz

      Test what you learned across the whole path.

    7. Flashcards15 min

      Git Fundamentals

      Review the commands and ideas with quick recall.

// next pathDocker