【问题标题】:Merging git repositories of different languages [duplicate]合并不同语言的git存储库[重复]
【发布时间】:2012-11-23 18:35:11
【问题描述】:

可能重复:
Combining multiple git repositories

我正在将应用程序从 PHP 重新编码为 Ruby。有没有办法合并两个存储库,同时保留每个版本的提交?理想情况下是这样的

[ruby 存储库]

commit 1
commit 2
commit 3
...

[php 存储库]

...
commit 54
commit 55
commit 56

[新存储库]

...
commit 54
commit 55
commit 56
commit 1
commit 2
commit 3
...

【问题讨论】:

  • 你的整数代表什么 - 提交的 SHA 哈希,还是只是一个排序?前者是不可能的(提交 SHA 会考虑血统,因此将针对其中一个存储库进行更改);后者是。
  • 只是提交的顺序
  • 所以基本上你只想将所有来自 ruby​​ 存储库的提交应用到 php 存储库之上,是吗?

标签: git github


【解决方案1】:

只需在 php/master 之上 rebase ruby​​/master:

git rebase php/master ruby/master

【讨论】:

    猜你喜欢
    • 2011-02-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-04-25
    • 2011-05-28
    相关资源
    最近更新 更多