We have been trying to get git-subtree working on a project (with git version 1.7.9.4) and have run into a bit of a complication. Someone else previous added the subtree wit
This could happen when the main repository and the subtree repository has different set of commits.
In my case I had updated the subtree from the local repository(using git subtree pull --squash -P foo local/foo.git master) and the local repository changes were never pushed to origin.
When I tried git pull --squash -s subtree git@example.com:foo.git master after this, I started getting the error.
Just pushing the subtree repository solved the error.