title: How to list all remote names without branches on git?
body: <p>I am trying to script a generic prune command that prunes branches from all remotes configed on the repository instead of doing it for a specific remote (usually origin).</p>
  
  <p>If you have a single remote like origin, the output should be just origin</p>
  
  <p>In order to do this I need a command that would list all remotes. The closes thing I came upon was:</p>
  
  <pre><code>git branch -av | sed -n 's/remotes\/\([^\/]*\).*/\1/p' | uniq
  </code></pre>
  
  <p>Is there another less complex way to retrieve the list of remotes?</p>
  
  <p>At this moment the pruning looks ugly:</p>
  
  <pre><code>git branch -av | sed -n 's/remotes\/\([^\/]*\).*/\1/p' | uniq | xargs git remote prune --dry-run
  </code></pre>