Server Fault is a question and answer site for system and network administrators. 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 have a git repository in my ubuntu server, which I like to access from my macbook. I enabled ssh to ubuntu from my mac. Can somebody give how can I setup git so that I can work fron both system. My requirement is simple, I just need to work from both system on the same repo (there will only be one user accessing the repo).

I saw some good tutorials like

I am not much sure about bare repository. I have a existing repo, and I like to work from both server and from mack book. Is this stright forward by just doing step 4 in the above tutorial. I don't want to do mistake as this is a working repo.



share|improve this question
An alternate solution is May have to pay a small fee but should be up and running in minutes. – jeffatrackaid Dec 30 '11 at 14:49

I do this lots, without setting up a git server. All I do is

git clone git+ssh:// path/to/clone

Setting up a whole server just to push and pull files about, seems like overkill, to me.

Just make sure that you remember to push back regularly, and you should be able to work fine from both locations

git pull origin <branchname>
git push origin <branchname>

to push and pull to and from the repo. Also, have a read of man git-push and man git-pull

share|improve this answer
thanks.. I think this may only what I need. Since u know it well, can you please edit the answer to include the command to push and pull .. So, I will push to the server before I work from server, and pull from server before work on client(Mac book). Please provide the command in these cases. thanks again – bsreekanth Dec 30 '11 at 14:51
git push origin – Tim Dec 30 '11 at 16:46
git pull origin – Tim Dec 30 '11 at 16:46

Your Answer


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.