From: Steven Grimm <koreth@midwinter.com>
To: "Robin H. Johnson" <robbat2@gentoo.org>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: Cloning of git-svn repos?
Date: Wed, 18 Apr 2007 10:21:49 -0700 [thread overview]
Message-ID: <462653AD.5060902@midwinter.com> (raw)
In-Reply-To: <20070418092916.GI31488@curie-int.orbis-terrarum.net>
Robin H. Johnson wrote:
> Is there a sane and git-recommended way to clone repos created with
> git-svn?
>
> If I do: 'git-svn clone ....', and then git-clone of that directory, the
> second clone cannot use git-svn to follow the original SVN or feed stuff
> back to the original SVN.
>
There is some git-svn-specific data in the .git directory that isn't
copied by git clone. You could perhaps get away with just copying that
(some stuff in .git/config, and the .git/svn subdirectory) into a cloned
child.
What I usually do instead is make a parent repository with git-svn, then
clone that as needed. I have a cron job that does "git-svn fetch" in the
parent periodically, so the child repositories can just update from the
parent to stay current. When I want to commit to svn, I push to the
parent repo (be careful here since git-svn can't create non-bare
repositories, so don't ever push to the currently checked-out branch in
the parent), git-reset the parent to whatever svn branch I want to check
into, merge the just-pushed change into the parent's current branch,
then do my git-svn dcommit.
That workflow could undoubtedly be made simpler. In particular, one
could use hooks in the parent repository to automatically do the
reset-merge-dcommit dance. If you had that, then pushing to the parent
would immediately commit those changes to svn and there'd be little
reason to want to do svn operations from the cloned children.
-Steve
next prev parent reply other threads:[~2007-04-18 17:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-18 9:29 Cloning of git-svn repos? Robin H. Johnson
2007-04-18 17:21 ` Steven Grimm [this message]
2007-04-19 13:03 ` Sam Vilain
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=462653AD.5060902@midwinter.com \
--to=koreth@midwinter.com \
--cc=git@vger.kernel.org \
--cc=robbat2@gentoo.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).