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.zip but while importing back in eclipse its not working.
Are there any other ways for importing and exporting git repositories?
Edit
After looking @VonC answer, I did this
git bundle create ~/abc.bundle --all
git bundle list-heads ~/abc.bundle
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 ....
git clone -b master ~/abc.bundle ~/newrepo/xyz/
But when I tried to import this git repo in eclipse I am getting only master branch as while cloning I used master. Is it possible to clone all the branches in a single command?
`master remotes/origin/HEAD -> origin/master remotes/origin/master` – Chandrayya G K Feb 25 '14 at 12:45