I rarely remember this, and virtually no one else knows, either. If you’re editing the contents of a SharePoint list in Datasheet view, entering the wrong data can be disastrous. Never use Datasheet view unless you really know what you are doing, as the changes are destructive, meaning that there’s rarely a way to undo or repair your changes. (Beware ye who enter here: There be dragons!)
But there is an undo, actually. Bet you can’t find it if you look for it, either! See that little bar I’ve highlighted below? If you click on it, you’ll get various options which you can take based on the list and what software you have installed on your machine.
The undo here is even a multi-action undo, like you’re used to in other Microsoft Office applications. Just be careful; it won’t undo all types of changes, and as soon as you commit your changes, you’re out of luck.