Push just part of a git repository to heroku -


i have source code managed git want push heroku. source code contains multiple different products, of have own heroku instance. this:

src/  lib-files/  app1/  app2/  app3/  other-files/  package.json 

so in heroku, have instance app1 , app2. both of these rely on ./lib-files , package.json not on app2 or app3 or other-files.

i don't want push entire git repository containing files heroku each app. in other words, don't want app1 instance contain code app2 or app3 or other-files because there lot of data doesn't need , takes ever copy up.

i got around creating new git repos each app (one contains stuff app1 needs , 1 app2, etc) , pushing individual repos heroku. works, seems bit hacky because have these other repositories have manage. also, if other devs want able push heroku need make repos available them, maybe checking them git (seems bizarre).

what way accomplish this?


update:

what if created heroku repos contained appropriate stuff each app let heroku primary remote repos (as opposed github)? still have multiple repositories deal with, @ least devs have standard place clone them (the source code repo being in github , heroku deployment repos being in heroku). thoughts on that?

the solution choose branching. have master branch containing files, , branch each application contain needs.

for example:

$ git init $ git add . $ git commit -m "initial commit" $ git checkout -b app1   # create new branch app1 derived master $ git rm what-you-dont-need-for-app1 $ git commit -m "initial app1 commit" $ git checkout master    # switch master again $ git checkout -b app2 $ # repeat same steps app1 

you can have unique .gitignore-file in each branch tell git don't want commit.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -