Saved but not committed files

Hi, I’m pretty new to dbt so would appreciate any help on this.
I’ve been working on a new branch making changes to existing model files, and creating new ones. The changes have been SAVED but I wasn’t ready to commit them just yet. After coming back to the cloud IDE after a few hours I had a popup saying I need to restart the cloud IDE which I did, but then all my saved changes have disappeared.
Is there any way to restore them? What is the best practice from here on, do I need to commit every few hours to avoid losing changes again??