Can you merge a Layer into the base app

In the app studio ALL my Pages got deleted on the base version of the app.

But i still have them on a Layer, is it possible to replace the the base with the Layer copy? I have tried so many things, but the fact that the app studio just randomly deletes your stuff and if you publish without noticing then its gone is such a pain.