From: Bruno Harbulot <Bruno.Harbulot@manchester.ac.uk>
To: git@vger.kernel.org
Subject: Re: git-svn clone on a central server
Date: Sun, 16 Mar 2008 14:47:11 +0000 [thread overview]
Message-ID: <frjbtf$rd0$1@ger.gmane.org> (raw)
In-Reply-To: <eaa105840803151645j5e8ec443v991b9117df343b8f@mail.gmail.com>
Peter Harris wrote:
> On Sat, Mar 15, 2008 at 3:38 PM, Bruno Harbulot
> <Bruno.Harbulot@manchester.ac.uk> wrote:
>> I'm trying to follow example 3 of the git-svn manpage, since I'd like to
>> keep a "central" clone of a subversion repository (and rebase it
>> regularly) on a server and work on local git repositories based on that
>> server's git repository.
> ...
>> I get this error:
>>
>> $ git-svn rebase
>> fatal: ambiguous argument 'HEAD': unknown revision or path not in the
>> working tree.
>
> You have to git reset --hard <branch> to create 'master' based on a
> particular svn branch, or git-svn won't know what to rebase.
>
> I sent a documentation patch to this list back in February, but it
> appears to have been dropped. I should probably re-send it...
>
> http://article.gmane.org/gmane.comp.version-control.git/72954
Thank you. This works. 'git reset --hard' was the key.
I've also managed to get it to work without '-s' (for just a
sub-directory of the trunk) this way:
ssh server "cd /pub && git svn clone -s
http://svn.foo.org/project/trunk/subproject"
mkdir subproject
cd subproject
git init
git remote add origin server:/pub/subproject
git config --add remote.origin.fetch +refs/remotes/*:refs/remotes/*
git fetch
git svn init http://svn.foo.org/project/trunk/subproject
# The following line creates a master branch
git reset --hard origin/master
git svn rebase
The way I'm planning to use this is to create a "central" bare
repository on the server (by moving the '.git' directory and setting
bare=true in the config file) that I would like to keep in sync with the
original SVN repository (and also push by own branches).
I'd like then to pull these changes to my working copies of that central
repository. I'm not quite sure how to update this central bare git
repository (and then its clones) with the changes in the SVN repository
upstream. (By the way, I'm not planning to 'dcommit' anything directly,
just reading from this SVN.) Are there any recommendation on how to
achieve this?
Best wishes,
Bruno.
next prev parent reply other threads:[~2008-03-16 14:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-15 19:38 git-svn clone on a central server Bruno Harbulot
2008-03-15 23:45 ` Peter Harris
2008-03-16 14:47 ` Bruno Harbulot [this message]
2008-03-17 15:01 ` Peter Harris
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='frjbtf$rd0$1@ger.gmane.org' \
--to=bruno.harbulot@manchester.ac.uk \
--cc=git@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox