When a favourable mutation sweeps to fixation, those genes initially linked to it increase in frequency; on average, this reduces diversity in the surrounding region of the genome. In the first analysis of this ‘hitch-hiking’ effect, Maynard-Smith and Haigh (1974) followed the increase of the neutral allele that chanced to be associated with the new mutation in the first generation, and assumed that the subsequent increase was deterministic. Later analyses, based on either coalescence arguments, or on diffusion equations for the mean and variance of allele frequency, have also made one or both of these assumptions. In the early generations, stochastic fluctuations in the frequency of the selected allele, and coalescence of neutral lineages, can be accounted for correctly by following relationships between genes conditional on the number of copies of the favourable allele. This analysis shows that the hitch-hiking effect is increased because an allele that is destined to fix tends to increase more rapidly than exponentially. However, the identity generated by the selective sweep has the same form as in previous work, h[r/s] (2 Ns)−2r/s, where h[r/s] tends to 1 with tight linkage. This analysis is extended to samples of many genes; then, genes may trace back to several families of lineages, each related through a common ancestor early in the selective sweep. Simulations show that the number and sizes of these families can (in principle) be used to make separate estimates of r/s and Ns.