Question

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.

Was it helpful?

Solution

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.

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top