Quick guide to undo the last Git commit safely using reset and revert with notes for pushed commits and staged changes