How can I sync files in two different git repositories (not clones) and maintain history?

后端 未结 2 1395
时光取名叫无心
时光取名叫无心 2020-12-30 09:53

I maintain two different git repos that need to share some files, and I\'d like the commits in one repo to show up in the other. What\'s a good way to do that for ongoing ma

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-30 09:54

    The subtree merge strategy, combined with the script git subtree, might help here.
    It would work for push and pull.
    It has still some issue with merges, although Git1.7.0 will fix that with a '-Xsubtree' option, but it still worth looking into.

提交回复
热议问题