Using git with svn

I need to use svn as a source control tool, but I want to use git branches locally. I wonder if this works without problems and what is the best approach. I read about 'git svn', but it looks like I will need to sync the entire svn repositoy in order to use it. This is not an option. Assuming I'm the only developer (not git push / pull between developers) and want to use git only "locally". What is the best approach? Just 'git init' in my local project with validation? And use both tools in the same folder? Are there any better approaches?

+5
source share
3 answers

You do not need to synchronize the entire repository. You can clone the modules you need:

git svn clone --stdlayout http://myrepo/module

This will lead to the loss of the entire history for this module. You can just grab HEAD:

git svn clone --stdlayout -r HEAD http://myrepo/module

This is how I work most days.

many related questions about the workflow git-svn... just follow the links to the right of this answer :-)

+5
source

Use git svn. You do not need to synchronize the entire repository and you can only synchronize individual branches, and you can skip the old story. However, you need to synchronize all changes, starting from the selected branches. It would be much less useful without it.

+2
source

All Articles