Return to Snippet

Revision: 18509
at October 1, 2009 07:51 by ehedenst


Updated Code
Server Side

$ ssh server.com
Last login: Thu Oct  1 10:32:15 2009 from 0.0.0.0
$ mkdir /opt/git/project.git
$ cd /opt/git/project.git
$ git --bare init
Initialized empty Git repository in /opt/git/project.git
$ exit
logout
Connection to server.com closed.

Client Side - Project needs to be an existing local repository.
See below how to create a local repository.

$ cd ~/git/project
$ cd project
$ git remote add origin ssh://server.com/opt/git/project.git
$ git push origin master

Creating a local repository:

$ cd ~/git
$ mkdir project
$ cd project
$ git init
Initialized empty Git repository in /Users/user/git/project/.git/

Revision: 18508
at October 1, 2009 07:02 by ehedenst


Initial Code
Server Side

$ ssh server.com
Last login: Thu Oct  1 10:32:15 2009 from 0.0.0.0
$ mkdir /opt/git/project.git
$ cd /opt/git/project.git
$ git --bare init
Initialized empty Git repository in /opt/git/project.git
$ exit
logout
Connection to server.com closed.

Client Side - Project needs to be an existing local repository. See below how to create a local repository.

$ cd ~/git/project
$ cd project
$ git remote add origin ssh://server.com/opt/git/project.git
$ git push origin master

Creating a local repository:

$ cd ~/git
$ mkdir project
$ cd project
$ git init
Initialized empty Git repository in /Users/user/git/project/.git/

Initial URL

                                

Initial Description

                                

Initial Title
Setting up a new remote repository for Git over SSH

Initial Tags
ssh, git

Initial Language
Bash