The story you read was mistaken, Caesar never decimated his troops. He threatened, according to Appian, to decimate the 9th Legion when they mutinied, but instead only executed 12 of the ringleaders. Crassus decimated his legions before taking on Spartacus, but Caesar was sort of known for managing disputes without generally having to actually resort to force
Decimation was an extremely rare punishment, despite the fascination that modern readers have with it. By Polybius' time it was already considered something of an archaism and by Cicero's day it was downright ancient and hadn't been seriously used in forever. When decimation was ordered the military tribunes assembled the troops and selected every tenth man by lot. Polybius seems to think that decimation could sometimes be inflicted on only those who had been proven to be guilty of flight in battle, but all of our other evidence seems to indicate that it was a punishment for the entire unit, not just the particular offenders. Those selected by lot were beaten to death by their comrades and the rest were given barley rations and ordered to pitch their tents outside the fortifications of the camp