title: What's the fastest way to work in git over a slow network connection?
body: <p>Here's the scenario:  At work we have quite a few branches and we haven't kept the repo as tidy as we should, occasionally adding/removing large files or whatnot, and rarely removing dead branches.</p>
  
  <p>So today is a snow day and I have to work from home.  I have a slow VPN connection, and all I need is the fastest way to get to the one branch I care about and start working, with the ability to push commits back.</p>
  
  <p>In SVN, I would have just updated the paths/files I needed and would have been working in no time.  Like most git newbies, I only have a handful of trusted commands, and my fallback git clone or git pull are going to be too slow.</p>
  
  <p>So it seems to be a two part question:</p>
  
  <ol>
  <li>How do I clone a repo to get working as quickly as possible, and</li>
  <li>How do I pull/push from this repo (edit, commit, pull, push)</li>
  </ol>
  
  <p><b>Working solution (per @g19fanatic's suggestions below):</b></p>
  
  <pre><code>&gt; git clone -b &lt;branchname&gt; &lt;repo_url&gt; --depth=1
  remote: Counting objects: 16679, done.
  remote: Compressing objects: 100% (11926/11926), done.
  remote: Total 16679 (delta 6936), reused 10919 (delta 3337)
  Receiving objects: 100% (16679/16679), 628.12 MiB | 430 KiB/s, done.
  Resolving deltas: 100% (6936/6936), done.
  &gt; git pull
  Already up-to-date.
  </code></pre>
  
  <p>(make small change on other machine, commit/push)</p>
  
  <pre><code>&gt; git pull
  remote: Counting objects: 5, done.
  remote: Compressing objects: 100% (5/5), done.
  remote: Total 5 (delta 0), reused 0 (delta 0)
  </code></pre>
  
  <p>Excellent, this left me with a working repo.</p>
  
  <p><i>The only issue is that it transferred twice as much data initially as the below <a href="https://stackoverflow.com/a/62476963/1026023">failed attempts</a> did</i>, but it did leave the repo in a usable state.  I'll considered this answered, but I think there could be improvement on the initial transfer size.</p>