ingydotnet/git-subrepo

`git subrepo push <subrepo> --force --squash` fails if there is no base commit

bindreams opened this issue · 0 comments

My scenario is I want to split an existing project into subrepos, and push a subrepo to a fresh remote while squashing years of history. The new remote for the subrepo should contain a single commit.

However this is what I get after running the command:

$ git subrepo push sdk --force --squash
git-subrepo: Command failed: 'git branch subrepo/sdk '.
fatal: not a valid object name: ''

As a note, it's not clear to me what exactly should be squashed if both --force and --squash are specified. Currently it squashes new commits. What should I write if I have pushed previously but now want to squash everything from the beginning?