Filter Deletes during git svn clone?

Problem: Legacy svn repo has a directory that is synced from user config on a prod server.

The sync effectively:

  • Can I use Git to search for matching filenames in a repository?
  • Egit's Team context menu has only one option: Apply patch
  • Easiest way to replay commits on new git repository
  • Heroku: Error pushing Rails app to Heroku, Heroku can't find Rails app
  • git - branch alias?
  • How can I know in git if a branch has been already merged into master?
    • deletes all files
    • commits
    • copies all files
    • commits

    Is it possible to filter out all of the file deletes during a git svn clone of this repo?

    And subsequent git svn fetches as well?

    I don’t necessarily want to filter the entire commit just the parts that delete files.

    This would mean changing the subsequent add files to become modify files.

  • Can we use :podspec link with dependencies in a podspec
  • Cloning git repository failed using eclipse
  • How to count total lines changed by a specific author in a Git repository?
  • How can I attach multiple urls to a single git remote?
  • Pushing subtrees in a git repo
  • Disadvantages of shallow cloning on Travis and other CI services?
  • One Solution collect form web for “Filter Deletes during git svn clone?”

    First off, if you want more control over your repo conversion, you may want to consider using Reposurgeon rather than git-svn

    Owing to the way that Git works, the impact of these evil practices in SVN are less severe than you think though.

    Firstly, Git itself has no notion of “file history”. There is no such thing as a “file modify” like there is in SVN or other VCS systems. Git only remembers a tree of files. And then another tree of files. Etc.

    If you compare HEAD to HEAD^^ (where HEAD^ is the intervening “deleted” commit), you will get results no different to those you’d get if you managed to leave the “deleted” revision out altogether.

    In addition, the storage requirements will not be very much greater – Git stores whole objects and compares them for similarity when making packs, unlike SVN which uses delta compression (and thus depends on that file history). Tree A + empty tree + Tree B (composed of mostly the same files) will take a very tiny extra bit of space compared to missing out the empty tree revisions.

    Git Baby is a git and github fan, let's start git clone.