Costco is a great place for buying foods in bulk and storing them.
As for longer term storage here a few tips:
Most canned foods have a real shelf life of three to five years, though the "Use By" date may show less than that. If the can still has a vacuum, what's inside is most likely still good, though with canned meat, fish, and most vegetables toss them if you notice off smell, color, or if the inside of the can is discolored (enamel loss, or metal breakdown). You know if the can has a vacuum if the top is still slightly concave and has a solid sound rather than a ringing or hollow ding when tapped on the top.
Canned foods with higher pH, like fruits (tomatoes, peaches, pears, etc) usually swell when they lose vacuum, usually because they've developed pressure caused by hydrogen gas as they spoil. This can happen due to under cooking or because one of the seams has lost integrity (due to a dent or cut). When opened these cans will release pressure and usually, but not always, smell nasty.
Flexible packaging: Paper, paper/foil, paper/foil/plastic laminated packaging usually has a one year shelf life though things like catsup packets may last only a few months. Dry goods in those materials can last for years depending on what they are and which type of packaging is used, foil and metalized mylar laminates generally last the longest.
If you're storing dry products, keep them dry. Oxygen, heat, and sometimes light shorten storage life. Grains such as rice, corn, wheat, and popcorn can be stored for years if you can keep them sealed tightly and stored in a cool dry place.
Storing milled grains such as flour are often become infested with weevils. If you buy large quantities for storage, you should probably repackage into smaller sealed packages. A five pound bag of flour in a one gallon ziplock bag is better than storing several regular bags together on a shelf. Weevils in one bag will find the other paper bags and infest them as well.
One trick to eliminate oxygen is to drop a piece of dry ice into the container just before tightly sealing the container. Dry ice is carbon dioxide and replaces much of the oxygen which slows the breakdown process of most dry foods.
Dry foods with fat or shortening such as mixes are usually good for at least a year or two, your nose and eyes will be a help in determining whether they've gone bad or the fat is rancid.
As far as storage in a garage goes, it depends on the temperature and how the temperature changes. Some items, such as liquids or those packaged in liquid, should be kept from freezing. Hot Summers, or a series of hot-cold-hot-cold cycles will tend to be harder on stored foods than most California Winters. You might think about keeping your garage doors closed most of the time, unless Summer temperatures inside your closed garage worse than outside.