Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 http://rudygems.com/post/65970932/setting-up-a-simple-git-server

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.

Thanks

bsr

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

1 Answer 1

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

git clone git+ssh://tom@githost.computer.local/home/tom/path/to/repository 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
1  
git push origin –  Tim Dec 30 '11 at 16:46
    
git pull origin –  Tim Dec 30 '11 at 16:46

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.