These are pain-points that are targeted in the 2.3 release.
Right now there is not way to export/import queries: everything stays in the Hue database.
In HUE-950 it is planned to have the queries editor save queries back to a file (that could be version controlled). A trash mechanism is also going to be added.
Also, directly using files from a version control repository will be done in HUE-951.
This is more discussed in this thread on the Hue mailing list.