Ionic reverse to init state after build

Hi there,
i have a strange behaviour of Ionic and it annoys me because i dont know why it is like that.

When i run in the shell “ionic build android” and “ionic run android”, ionic always reverse my project to the init state and all my written code is gone. It is also the same when i add some plugins.

Can someone tell me why ionic is like that? It is impossible for me to start a new project right now.

Sincerly,

Alex