简体   繁体   中英

Storing a repository in subversion and git

I'm currently trying to convince my company to migrate to git from subversion, and one thing that would be really helpful would be to allow me to store a repository in subversion and git at the same time (then I can show them how easy it is to do in git what they've spent an hour trying to do in subversion). I guess that I could put my subversion repository straight into git, but this seems to leave loads of .svn artifacts in each directory. Does anyone know if there's a way to avoid this?

Using git-svn might be your best choice at the moment - it's a bidirectional interface between git and Subversion. You create a git repository that is essentially a Subversion working copy. There are caveats though - you shouldn't clone that repository or do push/pulls from it. See the relevant manpage.

I would recommend having a pilot project that you switch from Subversion to git, instead of trying to do both Subversion and git at the same time on the same code. I worry about using git-svn as a stepping stone, because any problems with getting them to interoperate will likely be used to scuttle the whole git idea.

There's plenty of commentary about how/why to move from Subversion to some DVCS. Here's one I like:

http://joelonsoftware.com/items/2010/03/17.html

You can import a svn repository into a git repository and play with it, and sync at any time with the subversion changes. However AFAIK you can't send the git repository changes back to the subversion one.

Github just started offering read/write access to the git repositories. So it theory you could import a svn repository into a git repository in github, and continue using it with the svn tools too. They also offer a version to be used inside your firewall.

I hate to recommend it, but it may be an option that works for you. GitHub just announced subversion client support on Git Repositories .

Keep in mind, with new technology comes new bugs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM