简体   繁体   中英

Migrating from one GIT repo to another - how to sync latest commits?

I am migrating contents of a branch from one repo to two newly created repos. Lets say, I have a "Product-A" branch (containing components X and Y), the contents of which are being migrated to 2 newly created repos (one for each of X, Y). I have pushed the contents of Product-A branch onto master of new repos successfully. On the day of migration, I locked Product-A branch to prevent any check-ins. My problem is - how can I bring the master branch of new repos in sync with latest commits on Product-A? The contents on new repos have been manipulated to an extent where the directory structure on Product-A branch (of old repo) looks different from contents on new repos. A merge is practically not easy because of these changes. I appreciate any suggestions, thanks in advance.

Have you looked at tools like git-stitch-repo ? Or this question: Combining multiple git repositories ?

From your question, it is a little hard to understand by what you mean by "bring in sync" without resolving the changes in your directory structure. Do you mean some way of syncing identical files that wound up in different directories?

Me, I'd make a special "sync_branch" in each repo, merge in the changes from Product A, than merge that branch into the master.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM