How to regularly merge two git repositories, one with submodules into one without
Posted
by
smoothify
on Stack Overflow
See other posts from Stack Overflow
or by smoothify
Published on 2012-03-18T17:58:59Z
Indexed on
2012/03/18
18:03 UTC
Read the original article
Hit count: 215
git
|git-submodules
I maintain a Drupal project in a git repository containing submodules. This works well for me overall, and I like the submodule approach.
However, I would like to move my site to a hosting provider that offers deployment via git push but doesn't work with submodules.
I would like to keep my current repository intact, and then when I'm ready to deploy, I would like to merge the changes from my repository into the deployment repository, but any submodules need to be exported into the tree.
So, it needs to be (semi) automated, so I can just run a command or two and initiate the merge, and then push to the server. Ideally it would keep track of individual commits, but I wouldn't mind if it squashed them into a single commit.
How would be the most effective way to achieve this?
© Stack Overflow or respective owner