0

What is the best way to move Git repository with all branches and full history from Google Cloud to AWS cloud ? Is there a script or a list of commands I have to use?

Srini Vas
  • 9
  • 1
  • 4

1 Answers1

0

I think what you're looking for is the --mirror option for git clone and git push:

# clone repository from old location
git clone --mirror git clone old-url/my-repo
cd my-repo

# point the url for `origin` at your new repository
git remote set-url origin new-url/my-repo

# push all references to the new repository
git push --mirror origin

Replacing old-url and new-url with the appropriate repository URLs for your Google Cloud and AWS Cloud repositories.

larsks
  • 277,717
  • 41
  • 399
  • 399