Fibroblasts are the major mesenchymal cell type in connective tissue and deposit the collagen and elastic fibres of the extracellular matrix (ECM). Even within a single tissue, fibroblasts exhibit considerable functional diversity, but it is not known whether this reflects the existence of a differentiation hierarchy or is a response to different environmental factors. Here we show, using transplantation assays and lineage tracing in mice, that the fibroblasts of skin connective tissue arise from two distinct lineages. One forms the upper dermis, including the dermal papilla that regulates hair growth and the arrector pili muscle, which controls piloerection. The other forms the lower dermis, including the reticular fibroblasts that synthesize the bulk of the fibrillar ECM, and the preadipocytes and adipocytes of the hypodermis. The upper lineage is required for hair follicle formation. In wounded adult skin, the initial wave of dermal repair is mediated by the lower lineage and upper dermal fibroblasts are recruited only during re-epithelialization. Epidermal β-catenin activation stimulates the expansion of the upper dermal lineage, rendering wounds permissive for hair follicle formation. Our findings explain why wounding is linked to formation of ECM-rich scar tissue that lacks hair follicles. They also form a platform for discovering fibroblast lineages in other tissues and for examining fibroblast changes in ageing and disease.