tags:

views:

75

answers:

3

I have a svn repo that has all my projects/main codebase. There are some dependencies on some external/third party code that will sometimes have a git repo along with it.

My question is should I add the .git folders to my svn repo when I am commiting? I haven't figured out git-svn yet and I'm not sure what the workflow is, but just checking in a local git clone to a svn repo, is that best practice?

A: 

If the external code uses the git folder, then yes I would check it in (and it would if you ever want to pull it again)

webdestroya
+3  A: 

No, you'd in effect be duplicating the versioning process wasting lots of space and you'd end up out of date on one of them pretty quick.

What people don't realize is that the .git folder actually contains all the deltas for every version of every file you've got in (git) version control. This is all of course highly compressed, but still you'd be versioning your versioning.

I will refrain from quoting a popular internet meme here too :)

Update 6/2/2010

In regards to the grabbing it without the deltas, you can't. Git is a *D*VCS The d means distributed, you will always have a local copy of the whole repo.

As for the SVN Integration:

git-svn command on Kernel.org

Aren
Thanks Aren. I assume the meme you mention is RTFM? I know git is well documented but I haven't found a clear description/man page that shows me how to simulate a svn export from git. Ie, if I don't want the .git folders inside my svn repo, how do I grab a repo without the delta info and other extraneous data?
No, the Meme was "Yo Dawg, I heard you like to version control, so we put version control in your version control so you could commit while you commit.":)
Aren
Updated my answer with more info.
Aren
Please note, that you can simply (and savely) delete the .git folder, to get rid of the git versioning.
ZeissS
Ofcourse, but he shouldn't add it to the SVN Commit in the first place.
Aren
A: 

For third-party code, I would include it, assuming you want to maintain that link with the third-party repository (e.g. to update periodically). I would not include your project's .git folder in its own svn folder, however; others aren't going to want to check that out from svn

Michael Mrozek