Boot into Ubuntu recovery mode
Introduction
If something went wrong, you can try to solve your problems in recovery
During boot, select
Advanced options for Ubuntu
Then select
root
and execute the commands
mount -o remount, rw /
mount -a
cd /home
Now you are in your own home directory and can look there for your user and the files you recently edited.
Article author: Andrei Olegovich