2 points
FYI with many routers, switches, and firewalls there are ways to automatically rollback changes in case the device is unreachable after applying them. Usually the command is called something like “Rollback”.
You usually supply a time limit when you run the command and if you don’t confirm the changes before that time limit it will rollback. So if you run rollback 30
and then do something which breaks the network connection, the config will rollback in 30 seconds. If it does work, you simply cancel the rollback.