0

I am a php developer. I have installed Git on my system(ubuntu 12.04). Now i want to make my system as server and my colleague's systems as clients. ie, a local sharing. Is it possible? we are using eclipse as the editor. We have installed the EGIT plugin in our system. I am very new in Git.Please help me.

  • 1
    [here](http://stackoverflow.com/questions/315911/git-for-beginners-the-definitive-practical-guide) is some useful information on how to set up Git – Hinrich Jul 30 '13 at 11:14

2 Answers2

0

Run git daemon to serve your local git repository:

$ git daemon --export-all --base-path=$(pwd)

.. assuming pwd path is at your git repository..

Then others can either clone your repository or just pull from it if they already have the same repository cloned from a common origin:

e.g.

git remote add yourname git://your-ip-address/repo-name
git pull yourname master
  • thanks for the replay. i have created a repository (named Project)locally in my home. ie /home/user/Project Now i want to share this repository with my colleagues. – Varun Jyothi Jul 31 '13 at 06:29
0

First, you need a static local IP address on the server (or a local DNS hostname.) Let's suppose you have a static local ip of 192.168.1.23

Next your colleagues need to have permission to access /home/user/Project. The simplest way is to do this (on the server):

adduser gituser
chown -R gituser /home/user/Project

Now everything in your repo is owned by gituser. Give the password for gituser to your colleagues.

Next, on the client(s), run

git clone gituser@192.168.1.23:/home/user/Project

This should create a copy of your repo on the client.

As for EGit, I recommend leaving that aside until you are more experienced with using Git on the command line. Egit may be easier to use once you understand it, but it is NOT easier to learn.

naomi
  • 1,934
  • 1
  • 14
  • 29
  • Thanks for guiding me. After this done(as you mentioned above), my system became the server and my colleague's system as client?. – Varun Jyothi Aug 01 '13 at 04:21