In hope someone will find this information useful … this is my case:
Accidentally deleted a tag "quotes" from 223 notes.
After a few moments of panic and an attempt to google the solution (no, I don't keep backups apart form the TimeMachine) I've rushed back to my second computer, disconnected it from wi-fi and lan and tried three (better safe than sorry) solutions:
I've selected all notes with the infamous tag and
1. Exported the notes to an .enex file (incl. tags).
2. Created Table of Contents Note.
3. Applied a new tag "quotes_new" to the selection.
Reconnected to the internet and synced the notes. It turns out everything is fine – the original tag "quotes" was removed, the new one "quotes_new" is applied.