title: Which is the smarter git protocol, ssh or git(over ssh) or https protocol?
body: <p>Which is efficient? SSH:// or Git://  (File compression)</p>
  
  <p>I understand in Git, git protocol is smart because there is a protocol agent on both ends of communication to compress the file transfer resulting in faster clone by efficiently using the network bandwidth.</p>
  
  <p>From <a href="https://books.google.com/books?id=ZkXELyQWf4UC&amp;lpg=PA201&amp;pg=PA201" rel="noreferrer">an O'Reilly book</a> I found the following statements.</p>
  
  <pre><code>For secure, authenticated connections, the Git native 
  protocol can be tunneled over an SSH connection using
  the following URL templates:
  
  ssh: //[user@]example.com[:port]/path/to/repo.git
  ssh: //[user@]example.com/path/to/repo.git
  ssh: //[user@]example.com/~user2/path/to/repo.git
  ssh: //[user@]example.com/~/path/to/repo.git*
  </code></pre>
  
  <p>I'm not sure if the author means what he says. He talks of git protocol getting tunneled over SSH. </p>
  
  <p>From my perspective, unless you connect to the git port (agent port), the protocol is not in effect. And SSH is merely an uncompressed file transfer. But as per the author, if we use SSH he says the git protocol is tunneled over it. So is SSH smarter in GIT?</p>
  
  <p>Von C,
  Thanks for your answer. "Network protocols (HTTP and Git) are generally read-only" Git can be made <code>rw</code> when you run the daemon with <code>--enable=receive-pack</code>. </p>
  
  <p>Following are my concerns.<br>
  When they say git protocol is smart, they mean when you execute <code>git clone</code>, Git server agent compresses the data that is sent back to the client, so the clone should be faster. In my use case I'll be setting the Git server in Hongkong and using it on San Jose and other countries as well, So I want to be efficient over network due to latency concerns.</p>
  
  <p>So my question is when I use <code>git clone ssh://user@server/reposloc</code> do I get the benefits of git protocol also? As per O'Reilly author book he means git is tunneled over ssh, then how does git protocol work when I don't have git daemon running on the server.</p>
  
  <p>So using SSh://xyz... does it give both the benefit of ssh and git protocols?</p>
  
  <p>Appreciate your answers in advance.</p>