ingydotnet / git-subrepo

MIT License
3.28k stars 271 forks source link

git-subrepo last sync point not an ancestor #642

Closed tthompsongmsi closed 5 days ago

tthompsongmsi commented 5 days ago

I created this problem myself I'm just not sure how to fix it.

I had a git repo with a subrepo. I made a new git repo and copied the contents of the old repo into the new repo ( subrepo included ). Now when I try to git subrepo pull i get this error:

fatal: ambiguous argument '8cd15e350e96d496bcc1146c8e12ae1bdce67e3a^': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git [...] -- [...]' git-subrepo: The last sync point (where upstream and the subrepo were equal) is not an ancestor. This is usually caused by a rebase affecting that commit. To recover set the subrepo parent in '<path/to/subrepo>/.gitrepo' to '' and validate the subrepo by comparing with 'git subrepo branch <path/to/subrepo>'

Thanks in advance!

tthompsongmsi commented 5 days ago

ended up cloning the main repo in a different directory, moved subrepo to subrepo.bak, re-cloned subrepo, fixed differences with meld.