save and restore branches when creating solutions