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.
I am using EGIT in eclipse to work on git SCM.
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?
I tried,
git archive HEAD --format=zip >~/abc.zipbut while importing back in eclipse it's not working.
Are there any other ways for importing and exporting git repositories?
Edit
After looking at @VonC answer, I did this
git bundle create ~/abc.bundle --all 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> git clone -b master ~/abc.bundle ~/newrepo/xyz/ But when I tried to import this git repo in Eclipse I keep getting only the master branch as while cloning I used master. Is it possible to clone all the branches in a single command?