gitgit-svnsvn2git

"git pull <remote> master" into a sub-directory


Background:

I'm trying to move a package from an SVN repo to a GIT repo, while preserving it's history.

Steps:

I'd like to move that package into it's own sub-directory in the destination git repository. However, I'm stuck at this step: git pull <remote> master --allow-unrelated-histories

This pulls the code into the top level git directory. How do I pull that code into a sub-directory instead?

I've tried the following based on some SO answers, but that didn't work:

Clean up step:

The package will be maintained in the destination GIT repo, so I intend to:


Solution

  • If you wanted to import that SVN history into its own subfolder, you would need to import it into its own separate git repo.

    Then you can