To sign your application on a machine, a certificate must be requested only on this computer. So you cannot build from C1 to M2 and vice versa.
Unfortunately, this information is related to project.pbxproj, which is critical and should be supported by version control. I do not think there is any way to avoid flagging this information about a particular machine in version control.
If you have chosen a certificate for subscription, there is one option "Automatic profile selection". I have not tested it on individual machines yet, but it looks like it will automatically select the correct certificate for the correct machine. But if it is not, then you will have to manually select certi each time.
As my team does this, we have different macs for developers, and we do all of our signature stuff from one specific mac.
source share