To switch branches from say master to develop in the same environment yes you risk losing data.
One sure option is this Backup & Restore
Another option is to run a VM and clone a new copy.
To switch branches from say master to develop in the same environment yes you risk losing data.
One sure option is this Backup & Restore
Another option is to run a VM and clone a new copy.