Cu-Sn and Cu-In nanostructures of various compositions were grown onto Cu mesh substrates using a simple electrodeposition approach. In brief, Cu was co-electrodeposited simultaneously with either In (to create Cu-In) or Sn (to f abricate Cu-Sn) from 1.5 M H2SO4 solutions containing Cu/In or Cu/Sn salts at different molar ratios via applying relatively high cathodic current (1 A/cm 2 ). Under these conditions, H2 bubbles generated in-situ act as a dynamic template for constructing foam-like structures with mesoscale porosity. The morphology, structure and composition of the as-prepared bimetallic materials were examined by various material characterization techniques. In-situ SERS and glovebox-assisted XAS and XPS were used f or tracking dynamic changes of CO2ER intermediates and local changes of bimetallic surfaces and environment under CO2ER conditions. Gaseous and liquid products were quantif ied via gas chromatography and high-perf ormance liquid chromatography. Comprehensive details of the materials, synthesis procedures and characterization methods are provided in the supplementary information.