git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How to fetch all remote branches from remote?
@ 2009-08-03 22:20 skillzero
  2009-08-04  0:17 ` Peter Harris
  0 siblings, 1 reply; 2+ messages in thread
From: skillzero @ 2009-08-03 22:20 UTC (permalink / raw)
  To: git

Is there a way to fetch all the remote branches of a remote? I have
one computer that cloned a repository from a server and I want clone
that computer's repository to another computer, but it only brings
over the local branches from the clone. I'd like to also get all the
remote branches so it's the same as if I had cloned directly from the
server. Just as if I had cp -R'd the .git folder (except with the
remote tracking info I get when I clone). The source computer's
repository is using git-svn so I'm trying to make a copy of that
repository in a way that I can just push and pull changes to the
intermediate git svn repository then later do the final git svn
dcommit.

Is the best way to just copy the whole .git folder to the destination
computer and then add the original as a remote? That's a last resort
for me because as new svn branches are created, I'd like to pick them
up when I do git pull's from the second computer.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: How to fetch all remote branches from remote?
  2009-08-03 22:20 How to fetch all remote branches from remote? skillzero
@ 2009-08-04  0:17 ` Peter Harris
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Harris @ 2009-08-04  0:17 UTC (permalink / raw)
  To: skillzero; +Cc: git

On Mon, Aug 3, 2009 at 6:20 PM, <skillzero@gmail.com> wrote:
> Is there a way to fetch all the remote branches of a remote?

git config --add remote.$remote.fetch +refs/remotes/*:refs/remotes/*; git fetch

> I have
> one computer that cloned a repository from a server and I want clone
> that computer's repository to another computer, but it only brings
> over the local branches from the clone. I'd like to also get all the
> remote branches so it's the same as if I had cloned directly from the
> server. Just as if I had cp -R'd the .git folder (except with the
> remote tracking info I get when I clone). The source computer's
> repository is using git-svn so I'm trying to make a copy of that
> repository in a way that I can just push and pull changes to the
> intermediate git svn repository then later do the final git svn
> dcommit.

The above is what I use to set up my working copies from a
cron-enabled git-svn mirror.

Also,  if you're pushing instead of dcommitting from each clone, you
may wish to read  this thread:
http://thread.gmane.org/gmane.comp.version-control.git/111356/focus=112156
- your setup probably isn't that complex, but you might want to be
aware of some of the issues you might face in the "forced rebase"
environment of svn.

Peter Harris

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-08-04  0:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-03 22:20 How to fetch all remote branches from remote? skillzero
2009-08-04  0:17 ` Peter Harris

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).