Git setup for local development

gitrepository

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.

Best Answer

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.

Related Question