You never hear of CA's participation in the war.
How could the government have tracked your movements?
You could sit out the war almost anywhere in the Union, since the number of draftees was very small. Even if you were drafted you could always pay someone to replace you. So the simplest answer is you could just not volunteer for military service.
And California did participate in the Civil War (even if you don't hear much about it). It sent volunteer units to fight and even had to face a Confederate campaign (albeit it an unsuccessful one). The state's overall involvement may not have as heavy as that of the eastern states but it still felt the effects of the war.
One example of a historical figure who escaped the internecine conflict and headed to California to sit out the Civil War was Mark Twain. In his fictionalized account of his war experiences, “The Private History of a Campaign That Failed,” Twain describes the moment he decided to quit the band of inexperienced militiamen he called the Marion Rangers. The group had been running and hiding for most of their time at arms when their jumpiness expressed itself one dark night when they shot and killed an innocent horseman mistaking him for a Yankee scout. Twain writes the dying man's last words were filled with regret his wife would be widowed and children orphaned.
Twain writes: "Our boys went apart and consulted; then we went back and told the other companies present that the war was a disappointment for us and we were going to disband.
"We had done our share; had killed a man, exterminated one army, such as it was; let him go and kill the rest, and that would end the war."
Twain wrote the Civil War was “a blot on our history, but not as great a blot as the buying and selling of Negro souls.”
Twain left the war and never looked back. He later wrote "Roughing It" describing the experience. In the book Twain describes his journey through the West between 1861–1867. Twain joined his brother Orion Clemens, who had been appointed Secretary of the Nevada Territory, on a westbound stagecoach. When he failed at silver prospecting, Twain went to work writing for newspapers such as the Sacramento Union and the Alta California. It was during this time, in 1863, that he took the pen name Mark Twain.
Sure, a person could move to California, but that was a very long, hazardous trek because the railroads hadn't expanded to the west coast, and the travel was by foot, wagon, or ship. Since the Panama Canal wasn't open, ships had to travel around the coast of Argentina and skirt Mexico before arriving in California. The trip was probably as hazardous as fighting in the war.