Galaxies are the end product of the hierarchical universe. Understanding them thus requires reliable physics on all scales, from individual stellar populations to structure formation. As an ab-initio approach, semi-analytic models (SAMs) for galaxy formation and evolution are widely used to investigate galaxy properties. In this talk, I will give a brief introduction of a new SAM, ySAM, which has been developed by utilising halo merger trees extracted from N-body simulations and up-to-date physical prescriptions. Since halo merger trees are the essential backbones of SAMs, the impact of different halo merger tree building algorithms on ySAM will be presented. Galaxy mergers and in-situ star formation are considered to be two main channels for galaxy mass growth. I will show the contribution of mergers to stellar mass assembly histories according to the wide range of halo and galaxy mass. Finally, I will briefly report some issues on galaxy chemical evolution in ySAM.