Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bindreams opened this issue Apr 14, 2023 · 0 comments

Comments

@bindreams
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant