I have a current git repository at xp-dev.com, lets call it A. Now I have created a new project at xp-dev.com which has its own git repository, lets call it B. Now, A have a lot of committed code in it, and I would like to move all content of A including commit-history to B. And B is empty, it is basically just an initialized repository with no checked-in code.
How do I do this? I have tried to solve it myself but it seems almost impossible to just say “push content of A into B”…
Please, help me out, I spent several hours on this last night when I could have done more productive things 🙂
I’m new to git and I don’t know about the particulars of xp-dev.com, but you should be able to do it with something like this.
First, clone and mirror the original repository
Then push it up to its new home (providing the repo is already created)
Note: this is destructive to the new repository. It might be worth trying this offline first.