This article analyzes the problem facing an agent who has a long-term commodity supply commitment and who wishes to hedge that commitment using short-maturity commodity futures contracts. As time evolves, the agent has to roll the hedge as old futures contracts mature and new futures contracts are listed. This gives rise to hedge errors. The optimal hedging strategy is characterized in a world where contracts of several different maturities coexist. The strategy is independent both of the agent's risk aversion and, under certain conditions, of beliefs about expected returns from holding futures contracts. The methodology is compared with approaches based on dynamic models of the term structure. It is tested on data from the oil futures market.