/ Published in: Bash
How to setup a remote git repository via SSH.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
# 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
URL: http://www.tuxmaniac.com/blog/2009/12/14/setting-up-a-remote-git-server/