Using Git to improve workflow

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.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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.