title: How to split refs into chunks that are pushed accross several commands?
body: <p>Let’s say I have a repository with a large number of releases (tags). The repository is valid and git fsck report nothing.
  But when I pushed the repository over ssh, I ended up with<code>remote: Internal Server Error</code>.</p>
  
  <p>After investigating, it seems this the large number of refs which is the issue. I tried tried to set a repo with 4100 branches and the message was more verbose <em>(many<code>failed to lock</code>)</em>.</p>
  
  <p><strong>Step to reproduce : push a repository with more than 5000 refs to a new empty repository on GitHub or GitHub enterprise.</strong> Or just <a href="https://github.com/ytrezq/TestBranches" rel="nofollow">fork this repo</a>.</p>
  
  <p>Is there a way to solve this without having to split the repo for pushing it in several parts ?</p>