public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Graeme Geldenhuys <graemeg@gmail•com>
To: git@vger•kernel.org
Subject: pushing specific branches to a public mirror repos
Date: Fri, 17 Jul 2009 10:30:26 +0200	[thread overview]
Message-ID: <h3pcrg$ekk$1@ger.gmane.org> (raw)

Hi,

I cloned a SubVersion repository and am maintaining a Git mirror of it 
on GitHub. Here is an example of some of the SubVersion branches that 
got cloned.

refs/remotes/cleanroom
refs/remotes/fixes_2_0
refs/remotes/fixes_2_2
refs/remotes/fixes_2_2_0_dos
refs/remotes/florian
refs/remotes/fpc_2_3
refs/remotes/generics
refs/remotes/genfunc
refs/remotes/trunk
...

By default 'git svn' created a "master" branch which tracks 
"remotes/trunk". This is currently the only branch available on GitHub 
mirror repository and I push it as follows:

On our server which manages the subversion -> local git repos -> github 
sync process.

  $ cd /path/to/repository/
  $ git svn fetch
  $ git push github master

This works fine. Now I don't have any other local branches or any local 
modifications (I used to have, but reverted all of them) so now a 'git 
svn fetch' does clean fast-forward merges without problems.

I currently have the following git config setting for the remote github 
repository:

[remote "github"]
	url = git@github•com:graemeg/freepascal.git
	push = +refs/remotes/*:refs/heads/*

As far as I understand, if I do 'git push github', it is going to push 
all the SubVersion branches (as listed above) as heads to GitHub - but 
this is not what I want. Many of those branches in SubVersion are old, 
outdated or private development areas.

I only want to push the "trunk" and "fixes_2_2" SubVersion branches to 
GitHub as heads. How must I change by remote.github.push config setting, 
or must I do a manual push as I do with the local tracking "master" branch.

In summary:
  * Can I change remote.github.push so that if I run 'git push github'
    that it will ONLY push remotes/trunk and remotes/fixes_2_2 to
    GitHub mirror

  * or must I manually push those two to GitHub mirror as follows
     once off create a tracking branch:
       $ git branch --track fixes_2_2 remotes/fixes_2_2

     then hourly do the following:
       $ cd /path/to/repository/
       $ git svn fetch
       $ git push github master
       $ git push github fixes_2_2



Regards,
   - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net/fpgui/

             reply	other threads:[~2009-07-17  8:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-17  8:30 Graeme Geldenhuys [this message]
2009-07-17  8:51 ` pushing specific branches to a public mirror repos Johannes Sixt
2009-07-17  9:11   ` Graeme Geldenhuys
2009-07-17  9:47     ` Bert Wesarg
2009-07-17 10:05     ` Johannes Sixt

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='h3pcrg$ekk$1@ger.gmane.org' \
    --to=graemeg@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox