Version-Control for collaborative web application (understanding Git?)
Our team (about 5 people) builds web applications in a pretty chaotic way. There is one local server and one production server. Any development takes place on the local server and then is uploaded to the production server (when they consider it to be "done"). This usually ends up nasty. Someone is redesigning templates, someone is changing core functionality and someone builds a new feature that depends on something that is influenced by changes to the core functionality - at the same time. Before people can even start working, they make sure the files they need to change are "free" since files are accessed directly and would get overwritten. Having people with different knowledge for each discipline, I usually need to check all changes done to ensure nothing will break (regression). This is horrible and hard to collaborate. I'm thinking about a way to change this messy workflow.
I read that Git can be used to manage collaborative web applications but I can't figure out how to set that up. Branches on local machines just won't work (each co-worker would need to have his own webserver, app server, database server and the same configurations). Multiple branches on the same server (basically each developer has his own branch?) require a way to commit and merge changes at the push of a button. Is that even possible without having to do everything manually?
In the end we need a system that allows us to:
- develop without concurrent dependencies (separated environments)
- review/approve commits
- automatically merge approved commits
- automatically distribute the latest version (force pull)
- revert changes / demerge
I can imagine this working with source code where there's nothing to share but code and compiler. But web applications which rely heavily on their environment, seem to be way more difficult. But then again: Maybe I do not understand the whole thing yet. :(
Having a local environment for each developer is a must. Take a look at the guide we wrote about developing and deploying with branches:
I hope you'll find it useful.