* Behavior of "git push --mirror repo"
@ 2011-10-25 10:25 Sebastian Schuberth
2011-10-25 12:46 ` Sebastian Schuberth
0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Schuberth @ 2011-10-25 10:25 UTC (permalink / raw)
To: git
Hi,
I cloned a repository from "origin" to my local disk. I only have a local branch for "master", although there are more remote branches. Now I want to initialize a new empty bare repository with an exact copy of the repository, including all branches, also those remote branches that I have no local branch for. So I did:
$ git remote add sf <url>
$ git push --mirror sf
Which prints:
* [new branch] master -> master
* [new branch] refs/notes/commits -> refs/notes/commits
* [new branch] refs/original/refs/heads/master -> refs/original/refs/heads/master
* [new branch] origin/HEAD -> origin/HEAD
* [new branch] origin/bourke -> origin/bourke
* [new branch] origin/colorscheme -> origin/colorscheme
* [new branch] origin/cpuinfo -> origin/cpuinfo
* [new branch] origin/demo-ssao -> origin/demo-ssao
* [new branch] origin/master -> origin/master
* [new branch] origin/mesh-improvements -> origin/mesh-improvements
* [new branch] origin/mesh-iterators-subdiv -> origin/mesh-iterators-subdiv
* [new tag] gale2-static-dummy-window -> gale2-static-dummy-window
In the target repository "sf" I now alony have the "master" branch and the "gale2-static-dummy-window" tag, but none of the remote branches from "origin". I was reading the --mirror option as if this should happen:
* [new branch] origin/bourke -> sf/bourke
etc.
Is this behavior expected? If yes, what the correct way to mirror a repository then (without creating a local branch for each remote branch first)?
Thanks.
--
Sebastian Schuberth
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Behavior of "git push --mirror repo"
2011-10-25 10:25 Behavior of "git push --mirror repo" Sebastian Schuberth
@ 2011-10-25 12:46 ` Sebastian Schuberth
0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Schuberth @ 2011-10-25 12:46 UTC (permalink / raw)
Cc: git
On 25.10.2011 12:25, Sebastian Schuberth wrote:
> I cloned a repository from "origin" to my local disk. I only have a
Got it: I was missing "--bare" when doing my clone.
--
Sebastian Schuberth
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-10-25 12:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-25 10:25 Behavior of "git push --mirror repo" Sebastian Schuberth
2011-10-25 12:46 ` Sebastian Schuberth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).