Using a set of 15 high-resolution magnetohydrodynamic cosmological simulations of Milky Way formation , we investigate the origin of the baryonic material found in stars at redshift zero . We find that roughly half of this material originates from subhalo/satellite systems and half is smoothly accreted from the Inter-Galactic Medium ( IGM ) . About 90 \% of all material has been ejected and re-accreted in galactic winds at least once . The vast majority of smoothly accreted gas enters into a galactic fountain that extends to a median galactocentric distance of \sim 20 kpc with a median recycling timescale of \sim 500 Myr . We demonstrate that , in most cases , galactic fountains acquire angular momentum via mixing of low-angular momentum , wind-recycled gas with high-angular momentum gas in the Circum-Galactic Medium ( CGM ) . Prograde mergers boost this activity by helping to align the disc and CGM rotation axes , whereas retrograde mergers cause the fountain to lose angular momentum . Fountain flows that promote angular momentum growth are conducive to smooth evolution on tracks quasi-parallel to the disc sequence of the stellar mass-specific angular momentum plane , whereas retrograde minor mergers , major mergers and bar-driven secular evolution move galaxies towards the bulge-sequence . Finally , we demonstrate that fountain flows act to flatten and narrow the radial metallicity gradient and metallicity dispersion of disc stars , respectively . Thus , the evolution of galactic fountains depends strongly on the cosmological merger history and is crucial for the chemo-dynamical evolution of Milky Way-sized disc galaxies .