You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
「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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.