git-subtree pull complications

I had the same problem, and in my case it seems to be due to the initial subtree commit being merge-squashed into the master branch.

Looking through the subtree source I found this: https://github.com/git/git/blob/master/contrib/subtree/git-subtree.sh#L224

It looks like subtree greps your git log for git-subtree-dir: foo but doesn’t find a suitable commit. Try git log --grep="git-subtree-dir: foo/*\$", and if there’s something weird with that commit, such as it being a merge commit, that could be the issue.

Just pulling without squashing worked for me, apart from the annoying merge conflicts. I did that in a temporary branch which I then git merge --squashed into another branch to avoid a messier history. It could’ve been rebased instead too of course.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)