How to correctly saute onions and garlic

Many recipes instruct you to saute onions and garlic in oil or butter to start off a recipe. But you may run into a problem if you start sauteing them together.

Compared to onion, garlic contains much less water and more sugar. That means that if you start sauteing them together, by the time the onion is ready, your garlic will be dark brown or black (aka inedible).

Image result for saute onion

You can control this by varying the size of the pieces of garlic and by better controlling the heat, but in most cases, you'll want to simply add the garlic when the onions are almost ready. Not only will your garlic not burn, your dish will have a more garlicky flavor. And who doesn't love more garlic?