I have a project in which I have combined in a library using the Git subtree. I clicked and pulled out a few small changes between the library and the project.
A new repository was later created, which is the ultimate home for the library. It contains essentially the same version of the library code as my project, possibly with one or two minor changes. For various reasons, it does not convey any direct history of Git with the previous library house (this is not a clone of the previous library).
Now I want to change the project so that it pulls / pushes the library from a new location. The first time this happens, I also need to resolve any merge conflicts, although in this case the changes are trivial and you can simply redo them later.
What is the best way to do this?
I tried to delete the library instance in my project, and then delete it along with the old remotes and branches. Then I tried to add a subtree, etc. From a new location. It seems to have worked, but when I try to push off my project in the library, I get a deadly error with a bad object.
I assume that there is a flaw in the approach I tried - perhaps this is due to the lack of a common history - but I do not have a deep understanding of what is happening to know how to fix it, or what is the βrightβ approach to this problem it should be.
[update: edited the question to make it a little clearer - it was a bit ambiguous)
source share