Re: git-svn clone on a central server

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

 



On Sun, Mar 16, 2008 Bruno Harbulot wrote:
>  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?

I run "git svn fetch" hourly (and "git gc" daily) from cron on my
'server'. My working copies, I just "git pull" when I want an update
as usual.

I also occasionally "git svn (fetch|rebase|dcommit)" in my working
copies. Just remember to blow away .git/svn after each "git
(fetch|pull)" so that git-svn knows to rebuild the local index. Also,
you just have to wait for the central 'server' to run another update
before your next "git (fetch|pull)", or it will rewind the state of
your svn branches.

(Also note that state can get out of sync if an svn log message or
author changes between the working copy's "git svn
(fetch|rebase|dcommit)" and when the server's cron job triggers -
basically never, unless you happen to have coworkers who like to
ammend their svn log messages shortly after making a commit)

I don't push branches to my 'svn fetch' repo (I use a separate repo
for that), but I don't see why it would cause a problem.

I'm sure there are other ways to do this.

Peter Harris
--
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]

  Powered by Linux