I keep a small piece of whole ginger in the freezer as @gaffk does. I chop off a chunk as I need it.
Jarred or prechopped garlic doesn’t agree with me, yikes. I can eat as much fresh garlic as I like though. So garlic cloves or (in season) scapes it is.