The Problem
I have a Rails 3.1 app on Heroku which will soon require a bunch of (3rd party) submodules (some of which have submodules). Unfortunately, Heroku lacks submodule support. One suggestion on Heroku s website is to move the contents of the submodules into the main repo (here). This will work fine the first time, but there is a possibility that it won t the second. This could be caused by a major update in one of the third party submodules where a fast forward merge is unsuccessful. Obviously we can t manually merge a third party project.
The "Solution"
我们的暂定解决办法如下:
- Create a new temp branch based on the latest stable dev branch and merge the submodules into the project.
- Checkout to a
heroku
branch. - Nuke the contents of this
heroku
branch to avoid any possible conflicts, i.e. create a commit with everything deleted. - Merge the temp branch into the
heroku
branch. - Push this
heroku
branch to our Heroku server.
The Advantages
这将避免第三方分流中可能出现的任何冲突,并且可以描述。
The Disadvantages
这种做法极为不利,是特别志愿人员的最高抵抗者。
The Question
是否有更好的办法这样做?