How to merge nested git repo into parent repo, retaining history?

前端 未结 4 1511
天命终不由人
天命终不由人 2020-12-31 18:42

Now I know most git experts will immediately think of git rebase, but I am using the word \"rebase\" in the more general sense: I have the following structure o

4条回答
  •  醉梦人生
    2020-12-31 19:20

    No really use if this would work but could be worth a try. Assuming that the src is on a remote server and the parent is on a remote server. You can try the following.

    • git clone url to remote server to clone the the repo with tools, lib, and build
    • git add remote src url to the src remote repo
    • create a tracking branch of the src remote repo and then check it out on the parent repo
    • merge remote tracking branch into you main branch.
    • delete the second remote.

提交回复
热议问题