Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8950093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:22:25+00:00 2026-06-15T13:22:25+00:00

Having a web project on a webserver shared by some developers, drives me to

  • 0

Having a web project on a webserver shared by some developers, drives me to set up Git repo for that project.
But I still have some doubts about how to organize it.

Let’s assume I have my web projects in /var/www/

Some questions, ideas I’d like to receive comments:

Is it better to init the git repository in the same publication folder, or create /var/repo/, copy contents inside and init repos in these copies of project?

In the first case may I branch the project as a superuser and let people work on this branch… then decide to merge branches once tested? But in this case I don’t think people
could test their work easily on the webserver… they should need a local env. set up for testing.

If I create the /var/repo/domain.com, it would be nice to create Vhosts like http://git.domain.com to let developers test their committed work.

If I have the /var/repo/project.com and like to publish the committed work (e.g. copy the files to /var/www/project.com), how should I perform this copy action? With cp -R? Is there already a tool to perform this update when needed?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T13:22:26+00:00Added an answer on June 15, 2026 at 1:22 pm

    First of all you really shouldn’t make your web project the repository itself. First you should setup a repository for everybody to access. You can have a master and a development branch and everybody could also have own branches for special parts of the web application. The best solution is to have your repository on a different server than your live system.
    If you don’t want to test things locally you should set up a development/staging server so people can test things there.
    The best procedure is to use a deployment script for that, e.g. Capistrano.

    Your procedure should be like that:
    Server A: Repository with a master and a staging branch + other branches if needed for the development.
    Server B: Live System (you can use capistrano to deploy the master branch here – if you want to be the only one who is able to deploy to the live system you shouldn’t add any ssh key to the server but yours or use another authentication method)
    Server C: Testing environment (could also be on the same server like your repos but I personally prefer this separated as well)

    Now use capistrano to link the live system with the master branch and the testing system with the dev/staging branch. People should have ssh access to the staging server of course.

    They can push their changes to the repository using the dev/staging branch. After that they can use ‘cap staging deploy’ for deploying the dev/staging branch to the dev server to test their work.
    If everything works you can simply pull the dev branche and checkout the master. Use ‘git merge staging’ to merge the dev/staging branch into the master and push it into the master repository. Afterwards a ‘cap production deploy’ would install everything on your live system.

    It’s pretty easy to setup – just a few config things to do for everybody and you would have a great workflow.

    Hope it helped.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a web project where it has become clear that having some
I have a web server that serves a project that is a git repository.
I have web application Project having RPC call. one RPC async is working fine.
We already have an existing MSI Installer (web deployment project - .vdproj) that we
I have a maven web project that imported into eclipse. I have another maven
Having imported an existing GWT project into Eclipse, the WEB-INF/lib directory was empty and
Am having some products in my web service. I am getting the product name
I'm having trouble with my Apache Web Server. I have a folder (htdocs\images) where
I'm working on a relatively small, but fast-changing project (a web application) with a
This is an annoying problem I am having with Twisted.web. Basically, I have a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.