WEEK 7 · LESSON 5 · TOPIC 1 OF 6 · Core Idea

Core Idea

Lesson progress

0% Complete

SECTION 1 OF 1

In this topic · 1 sections
  1. Overview

Overview

Git provides several undo-related commands because "undo" can mean different things. You may want to unstage a change, discard an uncommitted edit, recover a deleted file, remove a tracked file, undo the latest commit, or reverse an older commit without erasing history.

The correct command depends on what must change and what must remain.