开发者

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

开发者 https://www.devze.com 2022-12-28 18:21 出处:网络
I have a subversio开发者_如何学编程n repository with a directory structure: frontend backend + a

I have a subversio开发者_如何学编程n 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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消