Re: Cloning of git-svn repos?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]