2017-12-04 22 views
0

gitリポジトリをサブフォルダに追加して、両方のリポジトリの履歴を保存する別のリポジトリに追加する必要があります(コンポーザパッケージリポジトリをメインリポジトリにマージして 'path'タイプが必要です)。最終的に1つのリポジトリ内にすべてのプロジェクト固有のパッケージを持つリポジトリを1つだけ持つことが目標です。gitリポジトリをサブディレクトリ保存履歴に追加する

私は、私は次のエラーを取得するサブツリーのワークフローを試みたが、mergeコマンドと

git merge -s ours --no-commit repo/branch 

fatal: refusing to merge unrelated histories 

は、どのように私はこれを管理することができますか?

ありがとうございました!

セバスチャン

答えて

0

gitのdocumentationから。

--allow-unrelated-histories

By default, git merge command refuses to merge histories that do not share a common ancestor. This option can be used to override this safety when merging histories of two projects that started their lives independently. As that is a very rare occasion, no configuration variable to enable this by default exists and will not be added.

git mergeコマンドを使用して、2つの無関係な履歴をマージする--allow-unrelated-historiesを使用してください。

関連する問題