Return to Snippet

Revision: 21471
at April 11, 2010 15:42 by narkisr


Updated Code
# SSHing into the remote machine
uname@remoteserver$ mkdir ~/git
uname@remoteserver$ mkdir ~/git/project-name.git
uname@remoteserver$ cd ~/git/project-name.git
uname@remoteserver/git/project-name.git$ git �-bare init
uname@remoteserver/git/project-name.git$ chmod -R g=u .
uname@remoteserver/git/project-name.git$ find . -type d | xargs chmod g+s
uname@localhost/localprojectrepo$ git init

# on the local machine
uname@localhost/localprojectrepo$ git init
uname@localhost/localprojectrepo$ touch samplefile.txt
uname@localhost/localprojectrepo$ git add .
uname@localhost/localprojectrepo$ git commit -m �First commit�
uname@localhost/localprojectrepo$ git remote add origin uname@remoteserver:<pathto>/git/project-name.git
uname@localhost/localprojectrepo$ git push origin master

Revision: 21470
at December 14, 2009 10:16 by narkisr


Initial Code
# SSHing into the remote machine
uname@remoteserver$ mkdir ~/git
uname@remoteserver$ mkdir ~/git/project-name.git
uname@remoteserver$ cd ~/git/project-name.git
uname@remoteserver/git/project-name.git$ git –-bare init
uname@remoteserver/git/project-name.git$ chmod -R g=u .
uname@remoteserver/git/project-name.git$ find . -type d | xargs chmod g+s
uname@localhost/localprojectrepo$ git init

# on the local machine
uname@localhost/localprojectrepo$ git init
uname@localhost/localprojectrepo$ touch samplefile.txt
uname@localhost/localprojectrepo$ git add .
uname@localhost/localprojectrepo$ git commit -m “First commit”
uname@localhost/localprojectrepo$ git remote add origin uname@remoteserver:<pathto>/git/project-name.git
uname@localhost/localprojectrepo$ git push origin master

Initial URL
http://www.tuxmaniac.com/blog/2009/12/14/setting-up-a-remote-git-server/

Initial Description
How to setup a remote git repository via SSH.

Initial Title
Settings up a remote git repository.

Initial Tags
ssh, git

Initial Language
Bash