Inspired by NSHipster I like to use xcconfig files for my bundle ID and team ID, this way they are hidden from GitHub.
PRODUCT_BUNDLE_IDENTIFIER = dev.yannick.appid DEVELOPMENT_TEAM = NDJH******
Added in the Project Configurations for each Target.
In the targets Build Settings, the values for PRODUCT_BUNDLE_IDENTIFIER, DEVELOPMENT_TEAM should not be bold, because bold means they are overwritten by Xcode. If they are, select them and press the delete key.