我有一个用例,我想将两个存储库的一些子目录合并到一个新的存储库中。
为此,我为我需要使用的目录的两个存储库创建了补丁
git log --pretty=email --patch-with-stat --reverse --full-index --binary -- path/to/file_or_folder > patch1
git log --pretty=email --patch-with-stat --reverse --full-index --binary -- path/to/file_or_folder > patch2
现在,我想使用 git am 合并新存储库中的两个补丁,当我这样做时,提交历史将按 repo 进行 repo(这是预期的)。有没有一种方法可以让提交历史按日期排序,而不管提交来自哪里?