Combining multiple git repositories

后端 未结 13 1384
眼角桃花
眼角桃花 2020-11-22 15:34

Let\'s say I\'ve got a setup that look something like

phd/code/
phd/figures/
phd/thesis/

For historical reasons, these all have their own g

13条回答
  •  眼角桃花
    2020-11-22 16:23

    git-stitch-repo from Aristotle Pagaltzis' answer only works for repositories with simple, linear history.

    MiniQuark's answer works for all repositories, but it does not handle tags and branches.

    I created a program that works the same way as MiniQuark describes, but it uses one merge commit (with N parents) and also recreates all tags and branches to point to these merge commits.

    See the git-merge-repos repository for examples how to use it.

提交回复
热议问题