0

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

1
  • An alternate solution is github.com. May have to pay a small fee but should be up and running in minutes. Commented Dec 30, 2011 at 14:49

1 Answer 1

2

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

git clone git+ssh://[email protected]/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

3
  • 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 Commented Dec 30, 2011 at 14:51
  • 1
    git push origin Commented Dec 30, 2011 at 16:46
  • git pull origin Commented Dec 30, 2011 at 16:46

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.