Preheat the oven to 180°C/350°F.
Thinly slice the top of the garlic heads off so the garlic cloves are exposed. The top of the garlic head is the part that comes to a point. When slicing it off, do it carefully so the cloves stay intact. Then, peel off any of the loose outer layers.
Cut squares of aluminium foil (big enough to wrap around the garlic heads). Drizzle each garlic head with olive oil and place a piece of the rosemary twig on top. Then, wrap them up tightly and place them onto a baking tray. Although this recipe calls for 6 heads of garlic, you can roast however many you'd like.
Place the baking tray into the oven for 1 hour.
When they are done, unwrap each head of garlic and scoop out the garlic cloves using a butter knife. Place them into the jar you plan on storing them in.
Place a few twigs of rosemary in the jar and pour extra-virgin olive oil over the garlic cloves until they are completely submerged. Seal the jar and store in the fridge for up to 2 months.
Once you've eaten the garlic cloves, you'll be left with delicious garlic and rosemary infused olive oil!