Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I had went through few Git Tutorial and Essential Training, I had basic knowledge for GIT. What I had learn from the tutorial, they teach me how to init git repository / github (as remote).

I got a question. Since GIT is Distribution repository. As I do some researches. I found that a lot of people are creating local / server repository and ask their colleague or developer check out in machine.

Is GIT possible do it without a so call "server repository". Developer B can clone the repository from Developer A. Developer B can push his code to Developer A. What I means there is no one "server / central" Github / repository. A and B their can do their push / pull update between them. Lets say suddenly Developer C come into the team, he can either get the source code from A / B master branch.

Is this concept correct? If yes, is there any tutorial / book teach how this able to setup?

I hope I make my question clear. If you need any clarify please do let me know.

share|improve this question
up vote 1 down vote accepted

Assuming that you have shell access to the other machine you can simply do

git clone <user>@<machine>:~/somerepository

to clone the repo. To pull you do

git pull <user>@<machine>:~/somerepository

That's it. If you don't have shell access you can also pull via http if the files if the files are distributed via web server.

share|improve this answer
I am in windows environment. Let's say I need to clone from Machine A, pc name is pc1, username is john. the repository sit on c:\www\test. What is the command? – Shiro Sep 7 '12 at 9:55
I don't use Windows. But I hardly believe that the git syntax changes on Windows. You can try using ssh://<user>@<machine>:22:~/somerepo. Do you have shell access? – Marco Sep 7 '12 at 10:09

Thank Macro for the answer,

I got my full answer from this link.


share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .