title: What is the right way of syncing a few folders across git branches?
body: <p>I have a Yii(PHP MVC) project with defined models, views and controllers. I have divided the application into different purposes by creating git branches and maintaining a single bare repository to manage all the branches such as api, dashboard, backend and others. Such a system help me split it on different autoscaling groups and servers.</p>
  
  <p>Now, I have to make frequent changes to the models which need to be used in almost all the branches. The controllers and views are different in the different branches. What is the right way to setting this up. Is there a way to make a folder branch independent? The current system has same models with different functions which were created as required by the particular application. Often, I need a particular function in api server that I added in dashboard branch.</p>