Skip to content

References: Undoing things

Pro Git by Scott Chacon and Ben Straub. Chapter 2 section 2.4 (Undoing Things) and Chapter 7 section 7.7 (Reset Demystified). Licensed under Creative Commons Attribution Non Commercial Share Alike 3.0 Unported.

Read the sources online at git-scm.com/book/en/v2/Git-Basics-Undoing-Things and git-scm.com/book/en/v2/Git-Tools-Reset-Demystified.

Pro Git’s “Reset Demystified” chapter is widely considered the clearest explanation of git reset’s three modes. L4’s reset framing is informed by it.

Atlassian Git Tutorials, specifically the “Undoing Commits & Changes” section at atlassian.com/git/tutorials/undoing-changes. Licensed under Creative Commons Attribution 2.5 Australia.

The Atlassian framing is a useful second voice for the reset vs revert distinction; some learners click with one explanation more than another.

Git documentation on git reflog at git-scm.com/docs/git-reflog. The authoritative reference. Includes the exact retention rules and the syntax for reflog references like HEAD@{N}.

For a deeper understanding of git’s data model (which makes all of these commands more intuitive): Pro Git Chapter 10 (Git Internals) covers how commits, trees, and blobs are actually structured. Reading it changes how you think about every other command.

For recovering force-pushed remote history: the Atlassian article “How to recover from upstream rebase” covers the scenario where someone else force-pushed and you need to reconcile. Out of T7 scope; mentioned for completeness.

For interactive rebase to clean up commits before push: Pro Git Chapter 7 section 7.6 (Rewriting History). We cover this in L12. The Pro Git reference is the canonical source.

Lesson 4 does not yet cite GitHub, GitLab, or Bitbucket’s web UIs for undo operations. The hosting platforms expose limited undo features (revert a PR, revert a merge); we cover these when introducing Pull Requests in L6.

This lesson is part of the Clawdemy curriculum, licensed under Creative Commons Attribution NonCommercial Share Alike 4.0 International. Pro Git’s CC BY-NC-SA 3.0 license and Clawdemy’s CC BY-NC-SA 4.0 license are directly aligned (the 4.0 license is an approved compatible adaptation license for 3.0 source material per the 3.0 license’s later-versions provision). Commercial use is licensed separately at /legal/licensing.