A simple current-limiting resistor in series with the battery will not help much and may actually make the problem worse in the case of negative going spikes. Those occur every time a motor starts up.
However, a diode followed by a capacitor is commonly used, and is especially helpful in the case of negative-going spikes. For a severe case of positive going spikes, an additional RC filter (100 Ohm/100 uF) can be added, after the capacitor.

