2

could you tell me please - is there any hack how to move git repos from (for example) Github with all branches and tags to any archive place? Of course - i can fetch all branches for repo, then push to the new remote, but is there easy way?

Alexey Poimtsev
  • 2,845
  • 3
  • 35
  • 63
  • What do you mean "*to any archive place*"? What are you trying to do? Are you trying to move your repos to another hosting provider like Bitbucket? Or do you want to make local backups of your remote repos? –  Jun 25 '14 at 08:49

1 Answers1

2

For fetching and the pushing, the usual sequence is:

git clone --mirror url1
git push --mirror url2

For backup need, I like the git bundle option.

git clone --mirror url1
cd repo1
git bundle create /tmp/repo1.bundle --all

That gives one file, easy to copy around, and from which you can clone!

git clone repo1.bundle
Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250