I have an existing, open, Git repository created from importing our source and history from CVS. I am making a mirror using:
git clone --mirror git:
Then I want to direct all branches and tags to our internal Git repo host, but clicking does not seem like the bare repository looks like a git repo .
I tried the following:
git clone --mirror git://aserver.adomain.com/myrepo git remote set-url origin http:// user@anotherserver.adomain.com /project/myrepo.git git push origin
that leads to:
$ git push origin Password for 'xxxx': error: cannot spawn git: No such file or directory
or am I trying:
$ git remote rm origin Note: Some branches outside the refs/remotes/ hierarchy were not removed; to delete them, use: ...a whole lot of branches... user@SOMEMACHINE /some/path/myrepo.git (BARE:master) $ ls HEAD config description hooks info objects packed-refs refs user@SOMEMACHINE /some/path/myrepo.git (BARE:master) $ git branch -a ...a whole lot of local branches... user@SOMEMACHINE /some/path/myrepo.git (BARE:master) $ git remote add mygithost http:// user@anotherserver.adomain.com /project/myrepo.git user@SOMEMACHINE /some/path/myrepo.git (BARE:master) $ git push
What is the meaning of "can not spawn git"?
How can I push an open repo with all branches to an empty existing one?
I have several possibilities and examined several SO problems, but I do not see a solution to this problem. It is clear that my understanding of this process is erroneous.
Update
I think my understanding was not a mistake. The error somehow misled me to think that something was wrong with the open repository, since I could clone and push the branch along the branch exactly from "ordinary" clones.
As it turned out, this is a bug in MSysGit. I switched to Linux because preserving my history was mandatory, in my case. I couldnβt just delete the branches and tags, since they had to click on an empty remote repo. So the following:
$ git remote rm origin $ git clone --mirror git://aserver.adomain.com/myrepo $ cd /some/path/myrepo.git $ git remote add mygithost http:// user@anotherserver.adomain.com /project/myrepo.git $ git push --all mygithost $ git push --tags mygithost