Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

2 Answers

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
add comment

Thank Macro for the answer,

I got my full answer from this link.

http://www.gosammy.com/2011/06/14/using-git-between-mac-and-windows/

Thanks!

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.