 <p>Your checkout failed because pulling (and hence fetching) an explicit ref fetches <em>only</em> that ref, so after your initial pull your repo had only <code>refs/heads/master</code> and <code>refs/remotes/origin/master</code>, both pointing at the same commit. Checkout of 2.7 didn't work because your repo didn't have anything by that name.</p> <p>Pull does a merge, and the extra content <code>git pull origin 2.7</code> put in your worktree is there for conflict resolution, merge can't determine the correct results so you have to. You'll see that not everything outside the Tools directory is checked out, only the conflicted files. I'm not sure how merge with a shallow fetch and sparse checkout should behave overall, but asking for conflict resolution is surely the only thing to do here.</p> <p>Doing a shallow one-ref fetch is as lightweight as git gets, if one-off bandwidth use is really that dear you could clone to an ec2 instance and tag a particular tree.</p>