Once upon a time, it became common practice to add onions and garlic to a hot pan at the same time. I think it had something to do with “letting flavours mingle,” but I’m not sure. Though they are both alliums, the two cook at dramatically different rates, and adding them together results in bitter, acrid bits of garlic scattered in a pile of undercooked onions.
Like bacon, garlic is best when started in a cold pan. Unlike bacon, however, it takes only a couple of minutes to reach your endpoint. The best way to tell when garlic is done? Use your nose. Add minced garlic to a cold pan with a little oil, turn the heat to medium, and let it hang out for a few minutes.
It will gently sizzle and sweat, and the initially pungent aroma will give way to a more mellow and inviting fragrance. As for colour, the fragrant bits should be a pale, slightly golden brown.
If you’re incorporating it into a recipe, cook the garlic first, then scoop it out and set it aside while you cook the rest of the meal, adding it back at the end. If you’re worried the loss of melding time will result in a loss of garlicky flavour, just add more garlic; it’s better to have a lot of perfectly cooked garlic than a small amount of burnt garlic. (Recipes almost always call for less garlic than I actually want, so doubling the amount is a good practice anyway.)