jump to navigation

GIT: Setting up new remote repo August 28, 2009

Posted by maxmil in : git , trackback

This is quick reminder for me of an excellent article from Toolman Tim.

Set up the new bare repo on the server:
$ ssh myserver.com
Welcome to myserver.com!
$ mkdir /var/git/myapp.git && cd /var/git/myapp.git
$ git --bare init
Initialized empty Git repository in /var/git/myapp.git
$ exit

Add the remote repository to your existing local git repo and push:
$ cd ~/Sites/myapp
$ git remote add origin ssh://myserver.com/var/git/myapp.git
$ git push origin master

Set the local master branch to track the remote branch. Copy the following into ./git/config

[branch "master"]
remote = origin
merge = refs/heads/master


no comments yet - be the first?