Place garden stakes every 3 feet along the bottom edge of an incline or at the four corners of a raised garden site. Wrap string around the top of the stakes to outline the wall.
Unearth grass and soil along the string with a shovel. Use a tape measure to measure a width of 10 inches and continue digging until the expanse is 12 inches deep. Press a tamper against the bottom to flatten the loose dirt and push out air pockets.
Fill half the trench of 3/4-in. gravel and tamp it down until the rocks can't shift under pressure.
Drill 9/16 in. pilot holes in the timbers for the first two rows. The holes should be 6 in. from each end, every 4 ft. and at a slight angle from top to bottom. Align the holes so they run continuously through one timber into the one below.
Drill additional 1/2-in. holes in the bottom timbers through the front to back every 4 ft. Stagger these holes so they do not align with the top-to-bottom holes.
Lay the bottom timbers on the gravel against the outer wall of the trench about 2 in. in from the end of the trench. Set a level on top and adjust the amount of gravel beneath until the bottom row, or course, is level.
Use a hammer to drive 12-in. lawn spikes through the back-to-front holes.
Place the second course of timbers over top of the first. Stagger the joints and align the pilot holes. Use a sledgehammer to 4-ft. lengths of rebar through the pilot holes. The angled holes will prevent the timbers from crawling up the rebar over time.
Use a pencil to mark the location for pilot holes in the third course of timbers. Set the holes 1/4 in. closer to the front of the timber and drill the holes. Fit the third row so the rebar goes through the pilot holes. This row will slightly lean toward the soil it is retaining, so gravity will ensure the wall's stability.
Repeat until the wall is your planned height or under 3 ft. Grind off any rebar sticking through the top course with a grinder and smooth off the edges.
Line the remaining trench and back of the timber wall with weed barrier fabric, tucking the top side in so it doesn't show. Fill in the remaining trench with gravel and fill the rest of the area behind the wall with the soil you removed to dig the trench.