If you are getting this error and your .git/config file is just fine then go through these steps (this is a common problem with a submodule in git repos - again do this from the submodule dir)
- git checkout master
- git pull
- (merge happens in background)
- git push