Cu2Cl2, 2H2O is cuprous chloride dihydrate, not anhydrous.
Copper can be electrodeposited by the electrolysis of an aqueous cupric chloride solution using carbon (graphite) electrodes. Following changes take place at the electrodes:
CuCl2 -> Cu2+ + 2Cl- ….dissociation in solution
At the cathode cations are attracted, and discharged, Cu2+ is preferred over H+ as it has lower discharge potential (cf. electrochemical series of cations):
Cu2+ + 2e -> Cu
Chloride ions are discharged at the anode and a gas bubbles out of it, which turns sodium iodide solution brown.
Cl- -> Cl + e, Cl + Cl -> Cl2 (g).