I want to start using a version control system (git) to manage having multiple website developers working on websites. This way, we can all see who made what changes and at what time.
I did some searching and found this guide on pushing code to a live server. My git knowledge doesn't really extend beyond simple commits and pushing/pulling so I have some questions about doing this.
Pushing code to a live server seems a bit risky. Would it be fine to keep the production code in a master branch and put new features/bug fixes into seperate branches. Then, other devs can pull in those branches and check them, etc, before merging them into master?
How can I manage permissions on the website docroot? If two different users are pushing their code to the server, how do I get those files to be owned by www-data:www-data when they're sent to the docroot?