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

subtree merging fails #896

Closed
stavros-liaskos opened this issue Nov 18, 2016 · 2 comments
Closed

subtree merging fails #896

stavros-liaskos opened this issue Nov 18, 2016 · 2 comments

Comments

@stavros-liaskos
Copy link

Following the instructions here:
https://git-scm.com/book/en/v1/Git-Tools-Subtree-Merging
will lead to an error.

In particular, if the subtree is merged and then updated, this command that is supposed to update the local subtree fails with a fatal: refusing to merge unrelated histories error.

$ git merge --squash -s subtree --no-commit rack_branch

A workaround could be using the --allow-unrelated-histories option

$ git merge --squash --allow-unrelated-histories -s subtree --no-commit rack_branch

But this completely destroys my project by pushing the subtree contents into a completely irrelevant directory in my project (no in the subtree).

Any ideas??

@sxlijin
Copy link
Contributor

sxlijin commented Feb 6, 2017

Hey, this is the issue tracker for the git-scm.com website, not Git itself. If you still want to discuss this issue, you should reach out to the community.

@peff
Copy link
Member

peff commented Feb 6, 2017

Yeah, --allow-unrelated-histories didn't exist when v1 of the book was published. If the issue persists in v2, I'd suggest opening an issue on the progit/progit2 repo. For general discussion of squash strategies, try the community link that @sxlijin pointed to.

@peff peff closed this as completed Feb 6, 2017
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

3 participants