title: git-upload-pack: command not found
body: <p>I've read this answer about eight-five times, but there's something I'm not understanding correctly:</p>
  
  <p><a href="https://stackoverflow.com/questions/225291/git-upload-pack-command-not-found-how-to-fix-this-correctly">git-upload-pack: command not found, how to fix this correctly</a></p>
  
  <p>When I try to clone a repository on my server, I get the following:</p>
  
  <pre><code>bash: git-upload-pack: command not found
  </code></pre>
  
  <p>But when I clone by giving clone the <code>-u /usr/local/bin/git-upload-pack</code> option, all works well.</p>
  
  <p>I guess this makes sense, since that's the position of the git-upload-pack on my server.</p>
  
  <p>The top answer suggests my .bashrc file on server needs to be updated to reflect this, as the result of <code>ssh you@remotemachine echo \$PATH</code> does not return <code>/usr/local/bin</code>. (It returns <code>/usr/bin:/bin:/usr/sbin:/sbin</code>).</p>
  
  <p>But when I look at my .bashrc file, it contains:</p>
  
  <pre><code>export PATH=/usr/local/bin:$PATH
  </code></pre>
  
  <p>So now I'm confused.</p>
  
  <p>What do I need to do to avoid using the <code>-u /usr/local/bin/git-upload-pack</code> option every time? Why does <code>ssh you@remotemachine echo \$PATH</code> not return <code>/usr/local/bin</code>? Is this something to do with login and non-login shells?</p>
  
  <p>Please help! Thanks in advance.</p>