Monday, February 8, 2010

How to specify a remote branch in git

Thanks to "Toolman Tim" - Setting Up a New Remote Git Repository

Plagiarized from Tim for quick reference:

$ 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
Bye!

$ cd ~/Sites/myapp
$ git remote add origin ssh://myserver.com/var/git/myapp.git
$ git push origin master