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
.git
at the end of a git repository folder is just a naming convention that usually means that the folder is a server and not a client. I believe it's determined by the repository being bare or not (bare repositories have no working directory). The clone URL just points to a folder, if the actual folder has .git at the end, add it. Otherwise, don't.
In practical terms they're pretty much the same. In meaning, they're using different protocols to connect to the server. ssh://
opens up an SSH connection to a server with a specific user and runs the git commands on the server (typically the server will restrict the commands by setting the user's shell to /usr/bin/git-shell
). git+ssh://
means that the server is running git daemon
locally and that clients need to first open an SSH connection to interact with the daemon.