Git allows recovering from mistakes by understanding commits and references. Commits point to parent commits and trees, representing snapshots of the repository. References like branches and tags point to commits. The working area contains unstaged changes, the staging area contains changes scheduled for the next commit, and the repository stores all commits. Mistakes can be fixed by amending commits, using reset or revert to undo changes, or checking out specific files from other commits. Rewriting public history should be avoided.