For the base mix flour and 1 pinch of salt in a bowl. Grate butter on a coarse grater to make flour. Mix everything briefly with a wooden spoon. Stir sour cream, lemon juice and 4 tablespoons of ice-cold water until smooth. Add to the flour mixture and mix first with a spoon, then briefly with your hands until all ingredients are combined. You should still see pieces of butter in the dough. Wrap the dough in foil and refrigerate for about 1 hour.
In the meantime peel and roughly dice the onions. Heat the oil in a large pan. Fry the onions in it while turning. Wash thyme, shake dry, pluck leaves from the stems and add to the onions. Sprinkle the onions with sugar and let them caramelize slightly. Deglaze with vinegar and wine. Season with salt and pepper. Bring to the boil and simmer over a low heat for 30-35 minutes until the liquid has evaporated, stirring several times. Remove from the heat.
Finely grate the cheese. Mix ricotta and 50 g cheese, season with salt and pepper. Roll out the dough on a floured work surface to a circle (approx. 28 cm Ø). Place on a baking tray lined with baking paper. Spread the cheese cream on the dough, leaving about 4 cm free all around. Spread the onion mixture on top. Fold the free edge of the dough all around over the filling. Sprinkle the rest of the cheese on top. Bake in the preheated oven (electric cooker: 200 °C/ convection oven: 175 °C/ gas: see manufacturer) on the lowest rack for approx. 30 minutes.
Clean and wash the spring onion and cut it into pieces about 5 cm wide. Cut pieces lengthwise into thin strips. Wash and clean the mangetouts and cut them diagonally into thin strips. Cut bacon slices into large pieces. Wash chervil, shake dry, pluck leaves from the stalks. Take the galette out of the oven and let it cool down briefly. Sprinkle with mangetouts, spring onion, bacon and chervil.