We describe a hedging strategy of CDO tranches based upon dynamic trading of the corresponding credit default swap index. We rely upon a homogeneous Markovian contagion framework, where only single defaults occur. In our framework, a CDO tranche can be perfectly replicated by dynamically trading the credit default swap index and a risk-free asset. Default intensities of the names only depend upon the number of defaults and are calibrated onto an input loss surface. Moreover, numerical implementation can be carried out fairly easily thanks to a recombining tree describing the dynamics of the aggregate loss. Both continuous time market and its discrete approximation are complete. The computed credit deltas can be seen as a credit default hedge and may also be used as a benchmark to be compared with the market credit deltas.