Using Git to improve workflow

January 3, 2018 97 views
DigitalOcean Git Ubuntu 16.04

I'm looking into ways to improve workflow for multiple developers on a webserver. Git is currently the most promising method at the moment to help track changes to files etc. but I have a few questions.

Firstly I am currently running an Ubuntu droplet with Apache 2 installed and I'm not sure what would be better; either renting a second droplet and setting up a private git server on that or just storing all our files on GitHub. I get that using GitHub would be cheaper but I'd prefer to not have all of my work out on the public domain.

Secondly if I went down the road of using git how would I be able to only allow users access to edit certain files at a time rather than have access to edit every file in the repository.

1 Answer

Another option for you would be to store your files on GitLab. Unlike GitHub, GitLab allows you to create private repositories for free. Adding a trigger to your GitLab setup would allow you to trigger a file update on your web server. You could choose whether to allow this setup to push to your live site or to set up a second virtualhost on your droplet so you could push to a staging environment before copying the changes over to your live site.

Have another answer? Share your knowledge.