Command-Z usually undoes the last supported action in a Mac app. Redo is often Shift-Command-Z, but check the Edit menu because applications can assign different shortcuts or provide a different undo history.
Read before repeating Undo
After a mistake, stop and inspect Edit › Undo. Some apps name the pending action, which helps you avoid reversing several unrelated changes.
Press the shortcut once and inspect the result. Repeated undo can affect more than the text you just noticed, particularly in an editor with grouped changes or a design app with several kinds of operations.
Use Redo to step forward
If you undid too much, use the Redo command shown in the same app. Making a new edit can change the redo history, so check before typing something else.
In a terminal, Command-Z is not a universal way to reverse a shell command. Commands that delete files, publish changes or modify an external service require their own recovery paths. A familiar text shortcut cannot make those operations reversible.
Keep a recovery habit
Save at sensible checkpoints and use the application’s version or backup features where available. Undo history may not survive closing a document or restarting an app.
A shortcut sheet helps you find menu commands, but learning what each command reverses is still important. For safer text revision, see selecting text with the keyboard before replacing a large passage.
TapNoise