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

  • Home
  • SEARCH
  • 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 6940665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:46:56+00:00 2026-05-27T12:46:56+00:00

I’ve never used version control before but I know it’s a good practice, so

  • 0

I’ve never used version control before but I know it’s a good practice, so I decided to try it out. I like git, so I’m using that. I have a local Ubuntu server (separate box) where I do all my local development.

So I installed gitosis (following the Ubuntu community docs) and set up all that jazz.

My IDE is Eclipse, so I installed Eclipse EGit.

I have my Apache docroot shared with Samba so on my Windows PC (where I develop) I just load my projects into Eclipse and save them directly to the docroot (so like \webserver\www\projectname is my network share).

So my understand of Git is that I should create my repositories in /srv/gitosis/repositories. But when using EGit, it just saves the repository to /var/www/projectname/.git – is that normal? I’m a little confused as to how the whole thing should work.

  • 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-05-27T12:46:56+00:00Added an answer on May 27, 2026 at 12:46 pm

    Since you’re using a network share, you’re essentially operating directly on your server, so there’s no need for the whole gitosis thing.

    In a normal source code repository situation, one would not have a network share with their centralized server. They would simply access it by SSH. In that case, gitosis is a solution they might use to provide certain users read/write access to the repository. They would push their updates to the server and pull down the updates of others.

    However, in your case, you’re accessing the server directories from a network share, so as far as git is concerned, it’s the same as a local directory. All you need to do is code and commit. No pushing and pulling required.

    However, operating directly on your web server’s content directory is probably not what you want. The reason is that as you make changes, switch branches, etc, you’ll end up putting your web server into a bad state. Think about it. You’ve got your fully functional website on the master branch. Then you checkout branch “my_website_2.0” which is not yet complete. Suddenly, all the files to which your web server points are in this half-completed state. Not good.

    There are lots of solutions to this problem, some complex, some not. For example, you could setup a shared repository on the server to which to push your master branch, and then clone it to your web content directory. (Note this would all still be done with simple paths, because of your network share).

    This page: Using git to manage website goes into detail on how to use git and have it automatically put shared changes in your webserver content directory, without having to do the clone on the server.

    I’m sure if you google around, you’ll find additional solutions.


    Here’s some additional detail, given your confusion below.

    Egit (and git itself) works on local repositories. There is not a command to configure remote repositories. You push to and pull from remote repositories, and that’s about it. You’re expecting Egit to do things it doesn’t do.

    Here’s what you need to do:

    1. Create a bare repository on your server. Since you’re using a network share, that would look something like: “git init –bare /mynetworkshare/usr/repositories/my_central_repo”
    2. Clone that repository locally: git clone /mynetworkshare/usr/repositories/my_central_repo my_local_repo
    3. Add your web server files to the local repo: cp -r my_webserver_files/* my_local_repo
    4. cd into the local repo: cd my_local_repo
    5. Add the files to git: git add . (note the dot)
    6. Commit: git commit -m “Initial commit of webserver files”
    7. Push the files to the central repository. “git push origin master”

    There. You now have a copy of the files in your bare, centralized repository. As stated earlier, now the task is to get those files from there into your web content directory. You could do that by cloning the central repository into your web content directory, or use a more sophisticated solution, like the one I linked or others you can find via google.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I used javascript for loading a picture on my website depending on which small
I've got a string that has curly quotes in it. I'd like to replace
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I need to clean up various Word 'smart' characters in user input, including but
Does anyone know how can I replace this 2 symbol below from the string

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.