All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael J Gruber <git@drmicha.warpmail.net>
To: Graeme Geldenhuys <graemeg@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Pushing to GitHub doesn't push all branches
Date: Fri, 10 Jul 2009 16:45:42 +0200	[thread overview]
Message-ID: <4A575416.2090304@drmicha.warpmail.net> (raw)
In-Reply-To: <h37fga$5ie$1@ger.gmane.org>

Graeme Geldenhuys venit, vidit, dixit 10.07.2009 15:24:
> Hi,
> 
> What am I doing wrong here.  I 'git svn clone' a SubVersion repository 
> and when it was done, I was placed in the "master" branch, which seems 
> to track the "trunk" branch of the remote.
> 
> I then added GitHub as a remote repository:
> 
> $ git remote add origin git@github.com:graemeg/freepascal.git
> 
> I then tried to push all the SubVersion branches to GitHub, but only the 
> "master" branch went through.  I thought the --mirror will push everything.
> 
> Any ideas?
> 
> You can view the repository on GitHub with your Web Browser at this URL:
>    http://github.com/graemeg/freepascal/tree
> As you will notice, under the "all branches" option, only "master" is 
> available.
> 
> 
> =======================
> $ git branch -a
> * master
>    remotes/aspect
>    remotes/avr
>    remotes/cleanroom
>    remotes/cpstr
>    remotes/ctypes
>    remotes/fixes_2_0
>    remotes/fixes_2_2
>    remotes/fixes_2_2_0_dos
>    remotes/florian
>    remotes/fpc_2_3
>    remotes/generics
>    remotes/genfunc
>    remotes/inline
>    remotes/janbruns
>    remotes/linker
>    remotes/linker@2665
>    remotes/llvm
>    remotes/merged
>    remotes/newthreading
>    remotes/objc
>    remotes/origin/master
>    remotes/rc_2_2_2
>    remotes/release_2_1_2x
>    remotes/release_2_2_4_rc1
>    remotes/resources
>    remotes/ssa
>    remotes/tags/release_2_0_0
>    remotes/tags/release_2_0_2
>    remotes/tags/release_2_0_4
>    remotes/tags/release_2_0_4_macos
>    remotes/tags/release_2_0_4_rc1
>    remotes/tags/release_2_0_4_rc2
>    remotes/tags/release_2_0_4_rc3
>    remotes/tags/release_2_1_2
>    remotes/tags/release_2_1_4
>    remotes/tags/release_2_2_0
>    remotes/tags/release_2_2_2
>    remotes/tags/release_2_2_2_rc1
>    remotes/tags/release_2_2_2_rc2
>    remotes/tags/release_2_2_4
>    remotes/tags/test_2_0_4
>    remotes/tags/test_2_0_4_1
>    remotes/trunk
>    remotes/tue
>    remotes/unicodertl
>    remotes/unicodestring
>    remotes/unitrw
>    remotes/wpo
> =======================
> 
> 
> $ git push -v --mirror origin
> Pushing to git@github.com:graemeg/freepascal.git
> Counting objects: 130317, done.
> Delta compression using up to 2 threads.
> Compressing objects: 100% (38881/38881), done.
> Writing objects: 100% (130317/130317), 54.53 MiB | 51 KiB/s, done.
> Total 130317 (delta 100296), reused 120757 (delta 90739)
> To git@github.com:graemeg/freepascal.git
>   * [new branch]      master -> master
>   * [new branch]      aspect -> aspect
>   * [new branch]      avr -> avr
>   * [new branch]      cleanroom -> cleanroom
>   * [new branch]      cpstr -> cpstr
>   * [new branch]      ctypes -> ctypes
>   * [new branch]      fixes_2_0 -> fixes_2_0
>   * [new branch]      fixes_2_2 -> fixes_2_2
>   * [new branch]      fixes_2_2_0_dos -> fixes_2_2_0_dos
>   * [new branch]      florian -> florian
>   * [new branch]      fpc_2_3 -> fpc_2_3
>   * [new branch]      generics -> generics
>   * [new branch]      genfunc -> genfunc
>   * [new branch]      inline -> inline
>   * [new branch]      janbruns -> janbruns
>   * [new branch]      linker -> linker
>   * [new branch]      linker@2665 -> linker@2665
>   * [new branch]      llvm -> llvm
>   * [new branch]      merged -> merged
>   * [new branch]      newthreading -> newthreading
>   * [new branch]      objc -> objc
>   * [new branch]      rc_2_2_2 -> rc_2_2_2
>   * [new branch]      release_2_1_2x -> release_2_1_2x
>   * [new branch]      release_2_2_4_rc1 -> release_2_2_4_rc1
>   * [new branch]      resources -> resources
>   * [new branch]      ssa -> ssa
>   * [new branch]      tags/release_2_0_0 -> tags/release_2_0_0
>   * [new branch]      tags/release_2_0_2 -> tags/release_2_0_2
>   * [new branch]      tags/release_2_0_4 -> tags/release_2_0_4
>   * [new branch]      tags/release_2_0_4_macos -> tags/release_2_0_4_macos
>   * [new branch]      tags/release_2_0_4_rc1 -> tags/release_2_0_4_rc1
>   * [new branch]      tags/release_2_0_4_rc2 -> tags/release_2_0_4_rc2
>   * [new branch]      tags/release_2_0_4_rc3 -> tags/release_2_0_4_rc3
>   * [new branch]      tags/release_2_1_2 -> tags/release_2_1_2
>   * [new branch]      tags/release_2_1_4 -> tags/release_2_1_4
>   * [new branch]      tags/release_2_2_0 -> tags/release_2_2_0
>   * [new branch]      tags/release_2_2_2 -> tags/release_2_2_2
>   * [new branch]      tags/release_2_2_2_rc1 -> tags/release_2_2_2_rc1
>   * [new branch]      tags/release_2_2_2_rc2 -> tags/release_2_2_2_rc2
>   * [new branch]      tags/release_2_2_4 -> tags/release_2_2_4
>   * [new branch]      tags/test_2_0_4 -> tags/test_2_0_4
>   * [new branch]      tags/test_2_0_4_1 -> tags/test_2_0_4_1
>   * [new branch]      trunk -> trunk
>   * [new branch]      tue -> tue
>   * [new branch]      unicodertl -> unicodertl
>   * [new branch]      unicodestring -> unicodestring
>   * [new branch]      unitrw -> unitrw
>   * [new branch]      wpo -> wpo
> updating local tracking ref 'refs/remotes/origin/master'
> 
> 
> Regards,
>    - Graeme -
> 

git-svn's standard ref structure makes it easy to shoot yourself into
the foot, and so does "--mirror". Combining the two is really a powerful
weapon :)

$git ls-remote   git://github.com/graemeg/freepascal.git
840169d189370c3b08760654800990404b2218df        HEAD
840169d189370c3b08760654800990404b2218df        refs/heads/master
3a5d5a06bbe62fada139c86438348e30ff4fcbe7        refs/remotes/aspect
f8a21acf439e698e7cb57a2a68401cfca2486c0c        refs/remotes/avr
78d1c138d4755f26ae1515842fcf36f13bf6b030        refs/remotes/cleanroom
b2701a7710bc343257b47738a06cb1290cec902f        refs/remotes/cpstr
92c78d3c8efe0bce64fda3f949596f37465bb6bb        refs/remotes/ctypes

etc.

You really mirrored your repo: All your "lost" branches are remotes on
the github side as well. That has two consequences:

1) They're not shown in the shiny interface.
2) They don't get cloned when someone clones from there.

At least 2) is completely unrelated to github, btw.

I think what you really want is to push everything under remote
(assuming there are only svn branches) into proper heads on github, i.e.
a refspec like '+refs/remotes/*:refs/*' for your pushes.

I assume you want to push master only if it differs from trunk, i.e. if
that repos is going to host not only the svn mirror but also your
additions. (I don't recommended that, a fork is better for that.)

Michael

  reply	other threads:[~2009-07-10 14:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-10 13:24 Pushing to GitHub doesn't push all branches Graeme Geldenhuys
2009-07-10 14:45 ` Michael J Gruber [this message]
2009-07-10 14:58   ` Michael J Gruber
2009-07-10 15:07   ` Graeme Geldenhuys
2009-07-10 15:51     ` Michael J Gruber
2009-07-13  8:12       ` Graeme Geldenhuys
2009-07-13 11:01         ` Michael J Gruber
2009-07-13 13:41           ` Graeme Geldenhuys

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A575416.2090304@drmicha.warpmail.net \
    --to=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=graemeg@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.