Characterizing the connection between the distribution and assembly history of galaxies and dark-matter halos is crucial to our understanding of galaxy formation, and to our ability to perform cosmological measurements from galaxy surveys. Investigating these relations requires the combination of multiple techniques, including N-body numerical simulations, clustering measurements, stellar population synthesis or weak gravitational lensing. In this talk, I will focus on the effect of halo assembly bias, which describes the secondary dependence of halo clustering on the accretion history of halos, at fixed halo mass. This effect, which has been observed in cosmological simulations, is expected to have a measurable impact on the galaxy population. An observational detection of assembly bias would place a fundamental constraint on the joint evolution of galaxies and halos.