Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Sourcetree にて履歴付きでGitリポジトリ統合する方法

Edited

「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

1 answer

0 votes
J. Sakurai
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jun 09, 2020

コミュニティに投稿いただきありがとうございます。

恐縮ながらSourcetreeでは該当の機能はございません。

次の記事が参考になるかと存じます。よろしければご覧ください。

https://blog.developer.atlassian.com/grafting-earlier-history-with-git

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events