DEV Community

John Ding
John Ding

Posted on

Mirroring Repository

$ git clone --bare https://github.com/EXAMPLE-USER/OLD-REPOSITORY.git

$ cd OLD-REPOSITORY.git
$ git push --mirror https://github.com/EXAMPLE-USER/NEW-REPOSITORY.git

//clean up
$ cd ..
$ rm -rf OLD-REPOSITORY.git

Top comments (0)