Tuesday, February 25, 2020

Duplicating a github repository


Follow below steps to duplicate your repository
  •   Create your new  repository called "my_new_repository"
  • Create a clone of your repository  
                     git clone https://github.com/user_name/my_old_repository.git
  • cd my_old_repository
  • Push mirror to new repository 
                   git push --mirror https://github.com/user_name/my_new_repository.git
·                           cd ..
  •  Remove old git
                rm -rf my_old_repository.git 
 
And here you go.

No comments:

Post a Comment