Search code examples
gitgit-svn

Importing only specific files from a svn repository to git


I'm trying to import a few files from SVN to a new git repository.

For Example, I have the following in SVN:

  files/file1
  files/file2
  files/file3
  files/image1
  files/image2

I want to import only the files/image* files.

Is this possible?


Solution

  • I assume from your tags that you're using git-svn? If so, check out the --ignore-paths option. Use it on git svn init or git svn clone to have the values you pass preserved in the local config, or on git svn fetch for per-fetch ignoring.