f00860
f00860

Reputation: 3576

svn (with git frontend) branch merging with different directory structure

I have a subversion repository with a directory structure:

frontend
backend
  + a
  + b

In a other branch, someone had put the sub-folders a and b in the root directory and delete the other stuff (frontend, backend).

a
b

Now i have to merge this branch back into the trunk (backend-folder). How can I do that to dont lose the history from the branches? I use git to access and work with the subversion repository.

Upvotes: 2

Views: 587

Answers (1)

VonC
VonC

Reputation: 1323953

git-svn should be able to import the history correctly considering it uses by default the --follow-parent option:

--follow-parent

This is especially helpful when we're tracking a directory that has been moved around within the repository, or if we started tracking a branch and never tracked the trunk it was descended from.
This feature is enabled by default, use --no-follow-parent to disable it.

If that does not work, making the right change (i.e. merging that branch in order to get back the original, already imported with git-svn, directory structure) directly in SVN before git-svn it, as khmerbaise suggests in the comment, might be a good workaround.

Upvotes: 2

Related Questions