I’ll introduce the methods of connecting the observed galaxies to the dark matter in the universe from the spatial distribution of galaxies. Traditionally, people have made great progress by relating the galaxy properties, such as luminosity, stellar mass and color to the dark matter halo properties, using all these galaxy-halo connection methods. An important element in the galaxy formation and evolution is the cold gas. Its relation to the dark matter halos is, however, less studied due to the lack of enough observations in the past decade. In our recent work, we have measured and modeled the relation between the neutral hydrogen component of the galaxies and the dark matter halo. We ﬁnd that the cold gas can potentially put strong constraints on the galaxy formation and evolution models. With the upcoming neutral hydrogen surveys, e.g. ASKAP, FAST and SKA, we will be able to understand more about galaxy formation.