title: git repository export and import to zip file or folder
body: <p>There are some similar posts on SO related to git repository export and import, but all answers are not complete. So I am asking separate question here.</p>
  
  <p>I am using EGIT in eclipse to work on git SCM. </p>
  
  <p>How I can export the git repository to a zip file/folder(with all branches, tags and history)
  and import the same repository back in Eclipse?</p>
  
  <p>I tried,</p>
  
  <blockquote>
    <p>git archive HEAD --format=zip >~/abc.zip but while importing back in eclipse its not working.</p>
  </blockquote>
  
  <p>Are there any other ways for importing and exporting git repositories?</p>
  
  <hr>
  
  <h3>Edit</h3>
  
  <p>After looking @VonC answer, I did this</p>
  
  <ol>
  <li><p>git bundle create ~/abc.bundle --all</p></li>
  <li><p>git bundle list-heads ~/abc.bundle
    <pre>
    refs/heads/master
    refs/remotes/origin/branch1
    refs/remotes/origin/branch1
    refs/remotes/origin/branch3
    refs/remotes/origin/master 
    refs/remotes/origin/branch4
    .....
    refs/tags/tag1
    refs/tags/tag2
    refs/tags/tag3
     ....</pre></p></li>
  <li><p>git clone -b master ~/abc.bundle ~/newrepo/xyz/</p></li>
  </ol>
  
  <p>But when I tried to import this git repo in eclipse I am getting only <strong>master</strong> branch as while cloning I used master. Is it possible to clone all the branches in a single command?</p>