dmarr
dmarr

Reputation: 490

Should .git folders be stored in my SVN repo?

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?

Upvotes: 2

Views: 189

Answers (3)

Aren
Aren

Reputation: 55946

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 DVCS 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

Upvotes: 3

Michael Mrozek
Michael Mrozek

Reputation: 175375

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

Upvotes: 0

Mitch Dempsey
Mitch Dempsey

Reputation: 39889

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)

Upvotes: 0

Related Questions