Skip to content
Infra X-Ray
AcademyExplore
Sign inCreate free account
Infra X-Ray

DevOps, simulated in your browser.

  • Academy
  • Explore
  • Roadmap
  • Contact
  • Privacy
  • Terms

Lesson 11 of 20

revert: undoing published history

9 min

Git: From First Commit to Team Workflows
FoundationsFree with an account
  1. What Git really stores
  2. Setting up: config, init and clone
  3. The three trees
  4. Inspecting: status, diff, log and show
  5. Ignoring, removing and renaming files
BranchesFree with an account
  1. Branches are pointers; HEAD is you
  2. Merging: fast-forward and three-way
  3. Merge conflicts, calmly
  4. Tags and releases
Undoing and rewritingFree with an account
  1. restore and reset
  2. revert: undoing published history
  3. stash: putting work aside
  4. rebase, and when to rebase vs merge
  5. cherry-pick: taking one commit
  6. reflog: getting lost commits back
Working with a teamFree with an account
  1. Remotes: fetch, pull and push
  2. Pull requests and branching models
  3. Team accidents: rejected pushes and force
Power toolsFree with an account
  1. Finding a bug's origin: blame and bisect
  2. Hooks and automation
Final exam
  1. Academy
  2. Git: From First Commit to Team Workflows
  3. Undoing and rewriting

revert: undoing published history

revert adds a new commit with the opposite change. Nothing is rewritten, so it is safe after pushing.

  • 9 minutes
  • 3 quiz questions
  • Lab: 5 steps
  • Free with an account
Loading the lesson…
Previous lessonrestore and resetNext lessonstash: putting work aside

Lesson 11 of 20

revert: undoing published history

9 min

Git: From First Commit to Team Workflows
FoundationsFree with an account
  1. What Git really stores
  2. Setting up: config, init and clone
  3. The three trees
  4. Inspecting: status, diff, log and show
  5. Ignoring, removing and renaming files
BranchesFree with an account
  1. Branches are pointers; HEAD is you
  2. Merging: fast-forward and three-way
  3. Merge conflicts, calmly
  4. Tags and releases
Undoing and rewritingFree with an account
  1. restore and reset
  2. revert: undoing published history
  3. stash: putting work aside
  4. rebase, and when to rebase vs merge
  5. cherry-pick: taking one commit
  6. reflog: getting lost commits back
Working with a teamFree with an account
  1. Remotes: fetch, pull and push
  2. Pull requests and branching models
  3. Team accidents: rejected pushes and force
Power toolsFree with an account
  1. Finding a bug's origin: blame and bisect
  2. Hooks and automation
Final exam
  1. Academy
  2. Git: From First Commit to Team Workflows
  3. Undoing and rewriting

revert: undoing published history

revert adds a new commit with the opposite change. Nothing is rewritten, so it is safe after pushing.

  • 9 minutes
  • 3 quiz questions
  • Lab: 5 steps
  • Free with an account

Sign in to continue

This lesson is free with an account.

A free account saves your progress and opens every free lesson, quiz and lab. In this course that is all five modules.

Create free accountSign in

Want to look around first? This lesson's lab runs in Explore, the sandbox, with no account.

Open Undo pushed work with revert in Explore
Previous lessonrestore and resetNext lessonstash: putting work aside