You can not change an existing local copy of the model using the Mendix SDK. The copy created in Mendix SDK is actually in the cloud.
The Team Server API can not commit models, only retrieve the metadata.
The local copy on the machine should be committed first. This can be in a branch, if that helps.