In 1846 , as the Mexican-American War was starting , some Americans in California hoped to create a California Republic . The California Republic was short lived . The same year marked the outbreak of the Mexican-American War ( 1846 â `` 1848 ) .