How can I push a git repository to a folder over SSH?
- by Rich
I have a folder called my-project inside which I've done git init, git commit -a, etc.
Now I want to push it to an empty folder at /mnt/foo/bar on a remote server.
How can I do this?
I did try, based on what I'd read:
cd my-project
git remote add origin ssh://user@host/mnt/foo/bar/my-project.git
git push origin master
which didn't seem right (I'd assume source would come before destination) and it failed:
fatal: '/mnt/boxee/git/midwinter-physiotherapy.git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
I'd like this to work such that I don't have to access the remote host and manually init a git repository every time ... do I have to do that? Am I going down the right route at all?
Thanks.