Working with Git under Typo3
I work with several developers on websites using Typo3 CMS at the same time and I was thinking of using Git so that we could all work together without overwriting each others work, but I've run into a few problems, and I wonder if you guys could give me some insights:
I was thinking of installing a local webserver for everyone on the team, but then the database is not accessible from outside the live webserver, so that means that we have to make a copy of the webserver. Then there is the problem of, how to keep the database up to date between the developers (for example, adding an extension)
We have to add several variables like BASEURL for the project to work properly on each developer#s workstation
This was only 15 minutes right on the task, but it immediately made me question:
- Is it practical to use VCS for developing websites between several developers?
- You should checkout gitosis to setup on git server accessible over the network
- For your environment problem :
- Try to uniformize development environment as much as possible
- Use the ignore feature of your VCS to ignore file that are supposed to handle only local changes
You need to identify which parameters are used to differentiate between the local and live environments, and in which files. This is really a separate issue from the use of VCS, although a common practice is to have a template settings file (the name can be slightly different from the actual file to avoid confusion) in version control that have configurations for multiple environments, but only one (usually local) set to active at any point in time.
### local ### port=8080 ### production ### # port=80
Another scheme is to put such environment-specific config files in the respective config/env folders, and reference them accordingly.