Fresh garlic is essential, but sometimes it's hard to use a whole head before it starts to sprout. Same with a hand of ginger: even a small one can start to mold in the fridge before you use it all up. What to do?
First, don't even think about those jars of minced garlic: It has a horrible chemical taste, zamorski says on Chowhound. FriedClamFanatic thinks Penzeys' dehydrated garlic is a better option, just rehydrate as needed. Garlic freezes well in the head, Bigjim68 says—it discolors, but the flavor doesn't change much. And though freezing does change the texture a bit, it should be fine for cooking.
Minced ginger from the jar is acceptable, Chowhounds agree, though it lacks the zip of fresh (tracylee likes the minced ginger that comes in a squeeze tube). The tube stuff tastes a little salty, so don't use it for anything where you want a pure ginger taste, like ginger tea.
Fresh ginger keeps well in the freezer. MjDematteis peels and freezes it whole, and finds it easier to grate in a frozen state; rtms freezes it after grating. You can also buy frozen ginger; chez cherie likes the Dorot brand—it tastes fresher than ginger from a jar.
Discuss: Pre-minced garlic and ginger?