tags:

views:

356

answers:

2

I've got a git-svn clone of an svn repo, and I want to encourage my colleagues to look at git as an option. The problem is that cloning the repo out of svn takes 3 days, but cloning from my git instance takes 10 minutes.

I've got a script that will allow people to clone my git repo and re-point it at the original SVN, but it requires knowing how I set some of my config values. I'd prefer the script be able to pull those values over the wire.

+3  A: 

I'd say the better way to do this would be, instead of requiring that your coworkers do a git clone, just give them a a tarball of your existing git-svn checkout. This way, you don't have to repoint or query anything, as it's already done.

Pi
Be aware that in such a case, however, all personal configs you may have made will be shared as well. For example, my global email config in git is my personal email and for work I override with the work email per local repo. If I share a repo like this I must remove this config.
webmat
This is true. The .git/config file should be sanitized before passing it on in the tarball.
Pi
+1  A: 

If they have direct access to your repository (that is, not via ssh or some other network protocol) then I'd say you could run


git config -f/path/to/your/repo/.git/config --get ...

to query the parameters out of your config file. Otherwise, as far as I can tell, they will have to first scp (or rcp or ftp or ...) your config file to a scratch space (not overwriting theirs) and then do the same queries on the local config file:


scp curries_box:/home/currie/repo/.git/config /tmp/currie_config
git config -f/tmp/currie_config --get ...

My only other thought is that you could maintain a copy of your .git/config file in your repository. Then, when they clone, they'll have a copy... though you'll have to manually update it... perhaps you can devise a hook to automate the update or at least detect when an update should be done.

Pat Notz