title: Simplify long path/to/repo.git when cloning with git
body: <p>The git repositories I have on my server (Debian-based) are stored in <code>/var/git/repositories</code>.</p>
  
  <p>So when I want to clone one of my repositories from my server, I have to do:</p>
  
  <pre><code>$ git clone ssh://user@server.example.com/var/git/repositories/myrepository.git
  </code></pre>
  
  <p>Nothing suprising here, but what a pain to type!
  Instead, I would like to do something like:</p>
  
  <pre><code>$ git clone ssh://user@server.example.com/myrepository[.git]
  </code></pre>
  
  <p>(Ideally, the .git would be optional... and even the <code>ssh://user@</code> part if possible, although <code>user@</code> is already optional)</p>
  
  <p>I am aware that I can edit my local <code>.gitconfig</code> with:</p>
  
  <pre><code>[url "ssh://user@server.example.com/var/git/"]
      insteadOf = fancyshortcut:
  </code></pre>
  
  <p>and clone using the following:</p>
  
  <pre><code>$ git clone fancyshortcut:myrepository.git
  </code></pre>
  
  <p>but I was wondering if there was such solution that would be handled by the server itself.</p>
  
  <p>Any idea?</p>
  
  <hr>
  
  <p><strong>EDIT</strong></p>
  
  <p>As an example, Github offers nice URLs as follows:</p>
  
  <pre><code>$ git clone git@github.com:mylogin/myrepository.git
  </code></pre>
  
  <p>Does someone have an idea how they could do that? (even if I know that they come with a whole infrastructure behind...)</p>