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:

  • EOF error javascript_include_tag Rails 4
  • how do I run cmd from the git post-commit hook
  • Git clone for Windows working with Direct Access
  • How do I insert a commit between two commits on a different branch?
  • NBGit to remote host with ssh
  • Git: having problems trying to keep a clean history tree
    • 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.

  • Ansible: how to clone a repository as other user
  • How do I count the number of git commits affecting a given subtree?
  • Jenkins - Unable to git clone from slave node. SSH keys
  • overwrite everything in master with another branch in git
  • GIT over SSH in Ansible hangs, eventhough ssh-agent forwarding is set up
  • git, how to overwrite commits
  • 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.