As far as I understand it, or at least from my experience, when you plug your iPhone into a Mac and the contacts are different it asks which way you want to sync. For example, when I edit contacts on my iPhone, then plug it into my Mac to sync, a box pops up telling me that the contacts are different on the two devices, and asks me if I want to sync from Mac to iPhone, or iPhone to Mac.
In other words, if you plug your iPhone into your computer it should give you the option to sync the contacts on your iPhone back to your computer.