I work with a small team that until recently didn't use source control. I'm working on the layout of our development/deployment workflow with git. I would appreciate and advice or insight you might have.
I'll spare you the details but we are basically using the git flow branching model and deploying with a remote pointed to a bare repo on the production server with a post-recieve hook. My question is with a larger project we have been developing. This is an application that will have many instances that will need to be able to update from the master branch of the applications repo but also have it's own set of unique files (front end project specific files).
I'm a little lost and I think it may be because I have the deployment scheme a little off. I've heard many people say "git isn't for deployment" and an equal number saying the opposite. The system works great for us currently pushing to the remote that deploys it based on that server's post-receive hook.
One deployment idea we have is to have a list of branches from the App's master that will have it's own 'projectA-master' and 'projectA-develop' branches that will follow our current git workflow. This leads us to having MANY branches on the original App repo and that feels wrong. Not to mention it doesn't scale well. We only have four servers slated for deployment but this method is awful when it gets to be 20 or more. That's a deal breaker.
master---A---B---C
\\ \
\\ develop--A--B--C
\\
\projectA-master--C--D--E
projectA-develop--C--D--E
Yuck.
Another idea was to have the App repo for development and updates and another repo (maybe App-frontend) that would be specific to each project and have a similar branching model above only not in the original App repo preserving it's code and branches to only core app specific development. Then having both deploy into the remote server.
master(App)---A---B---C---E---F----G
\ / \___
develop---A---B---C---E----F ___ Live Instance
/
master(App-frontend)---A---B---C---E
\ /
develop---A---B---C----E----F
This too feels wrong.
I used .gitignore to ignore all of the directories that are project specific but the problem I had there was that my FE files were not being source controlled on the remote server, they remained un-tracked.
I don't know how to push updates from the app master repo and not override the custom files on the project specific (remote server repo) level.
So how do you manage a situation like this? You've a product that will have many instances but each instance has client specific front end files. And how is this managed on a large scale of hundreds to thousands of instances and you still need to push out updates/fixes?
I've been all over these and other forums and I've gotten pretty far from not really utilizing git at all. If you have the time I would appreciate some input from those of you more experienced that can tell me what I'm doing wrong and what I'm doing right.
Thank you very much.