git merge-file
(https://git-scm.com/docs/git-merge-file)とファイル単位でこれを行うことができます。多くのファイルが含まれている場合、これはかなり面倒なことがあります。
また、マージを行う一時的な「統合レポジトリ」を作成することもできます。
mkdir merge-repo
cd merge-repo
git init
# copy in the previous imported version of each file
git add .
git commit -m base
git branch source
# copy in the current version of each file with your changes (note you're still on master)
git add .
git commit -m ours
git checkout source
# copy in the current version of each file from the source repo
git add .
git commit -m theirs
git checkout master
git merge source
# copy the merged files back to your repo
cd ..
rm -rf merge-repo #if you don't want to keep it around, you don't need it any more
後者はより多くの可動部分があるかもしれませんが、私はあなたがスクリプトをそれらをことができるに違いないし、それは個々のmerge-file
コマンドをステージングするファイルで、ファイルを行くよりもはるかに少ない退屈になるでしょう。
ありがとう!私はgit-merge-fileについて知らなかった。 これは実際にはスクリプト化されたプロセスの一部です。素晴らしい提案:) –