I setup a git repo in foo
cd
mkdir foo
cd foo
git init
Now I want to reference that remotely
git clone git+ssh://me@somemachine
The .git
suffix is just convention to indicate that the directory in question is a bare git repository (ie, one in which there is no working copy). It's not actually required.
As for git+ssh://
, according to the git-fetch manpage, it is not allowed:
Git natively supports ssh, git, http, https, ftp, ftps, and rsync protocols. The following syntaxes may be used with them:
- ssh://[user@]host.xz[:port]/path/to/repo.git/
- git://host.xz[:port]/path/to/repo.git/
- http[s]://host.xz[:port]/path/to/repo.git/
- ftp[s]://host.xz[:port]/path/to/repo.git/
rsync://host.xz/path/to/repo.git/
An alternative scp-like syntax may also be used with the ssh protocol:>
- [user@]host.xz:path/to/repo.git/