「AAA.git」および「BBB.git」というGitリポジトリがあり、
「BBB.git」を履歴(コミットログ)付きで「AAA.git」に統合したいと考えております。
(元々のリポジトリのデータはルートにサブフォルダを作成して移動)
【統合前ツリー】
…/AAA/master/AAA1.*
…/BBB/master/BBB1.*
【統合後ツリー】
…/AAA/master/AAA/AAA1.*
…/AAA/master/BBB/BBB1.*
上記「…/BBB/master/BBB1.*」→「…/AAA/master/BBB/BBB1.*」(履歴付き)を実現するためのSourceTreeで実現方法を教えてください。
下記手法を試しましたが実現できませんでした。
【試した内容】(ターミナル)
①リポジトリAAAをクローン
「…/AAA/AAA1.*」
②AAA直下のファイルをサブフォルダに移動させてコミット
「…/AAA/AAA/AAA1.*」
※カレントディレクトリ:.../AAA(サブフォルダのAAAではない)
③mkdir BBB
④git remote add BBB BBBのリポジトリURL
⑤git fetch BBB
⑥git merge -X subtree=BBB BBB/master --allow-unrelated-histories
この時点で
・BBBのリポジトリの内容が「…/AAA/BBB/」
にDLされる想定であったが、
・BBBのリポジトリの内容の一部が「…/AAA/」
にDLされていた。
SourceTree version 2.4.8.0
コミュニティに投稿いただきありがとうございます。
恐縮ながらSourcetreeでは該当の機能はございません。
次の記事が参考になるかと存じます。よろしければご覧ください。
https://blog.developer.atlassian.com/grafting-earlier-history-with-git
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.