how to migrate multiple branches of a subfolder to another repo with git subtree -


I want to migrate to a subfolder with the entire history of the repository 1:

  a ->; B - & gt; C (branch 1) \ - & gt; D (branch 2)  

repository in the same target folder 2:

  old - & gt; Merged _sub folder (master) / a * - & gt; B * - & gt; C * (branch 1) \ - & gt; D * (branch 2)  

with * subfolders denote the boundary.

So far I

  git subtree Split -P subfolder B Shakhaan- git subtree Split -P subfolder B Shakhaoteepitititiaiteepitimapi -P Lcshy_folder Ripoiiai Shakhai  

then I made in branch b 2 * 2, but

  Jiaiti add subtitles drink ./ repo_1 branch_2  

does not work Is because

  prefix './' already exists  

any suggestions for resolving the problem?

And later, how to merge into the repository with 2 in Master 2?

-b option to git subtitle split Specify a new branch to be created in which you have created two new branches, branch_1 and branch_2 , to create history from the new history, not the branch, in which both of you There is a new history for the branch in which you were presently.

Then I branch created 2 b b * in the repository 2

It has no effect Add git subtree a repository Receives a committed and its history and merges it into the present branch; It does not see other branch names at all.

The prefix './' already exists.

You can not add a subtitle for it. Existing directory without adding a sub-section of the merged will be only a common object; You can still explicitly add (and merge) sub-projection and can return the merge later. In summary, to complete the migration:

  # 1 git repository in subtree Split -P Sbfolder- B Shakha_l_ni Shakha_l Jiaiti subtree 2 Jiaiti subtree Split -P subfolder B Shakha_2_anu Shakha_2 # repository Ed -P target_folder repo_1 branch_2_nu git branch branch 2 HEAD ^ 2 git reset - hard head ^ git subtitle add-p target_folder repo 1 branch_1_nu if you later did the other branch in the main project Micro decide to merge,  
  git subtree merge -P target_folder branch_2     / code> 
< / Div>

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -