Step 1: Understanding the effect of shunting.
When a galvanometer is shunted with a resistor \( X \), the total current is shared between the galvanometer and the shunt. The deflection in the galvanometer is directly proportional to the current passing through it. When the deflection is reduced to half, the current passing through the galvanometer is halved.
Step 2: Applying the relation between the resistances.
The current through the galvanometer and the shunt are related by the formula:
\[
\frac{G}{X} = 2 \quad \Rightarrow \quad X = G
\]
Step 3: Conclusion.
Thus, the resistance of the shunt is equal to the resistance of the galvanometer, \( X = G \), which corresponds to option (D).