Can you get cold sores from giving mouth to mouth to someone who has cold sores?

Yes. Herpes virus is usually shed when a visible sore is present; however, the virus can be present even without a sore showing. You usually need to have a portal of entry for the virus to infect you (cut, dry lips, etc). But is you have been exposed before and have anti bodies against the herpes virus you have be able to fight it off. Wearing lip stick, lip gloss or chapstick will help protect you.
Yes. Yes you can. Cold sores are caused by herpes virus that is pretty contagious.