All pastes #822116 Raw Edit

remote repository with git

public text v1 · immutable
·published 2007-12-18 15:13 UTC
rendered paste body
ssh user@remote.host
cd public_html/git
mkdir my-project.git && GIT_DIR=my-project.git git-init
chmod +x my-project.git/hooks/post-update
logout

# push
git push ssh://remote.host/~user/public_html/git/my-project.git master:refs/heads/master

# push using a remote
git remote add remote-host ssh://remote.host/~user/public_html/git/my-project.git
git push remote-host master:refs/heads/master