Copy a git repository from one remote to another with history
- Clone with mirror
git clone --mirror <url to ORI repo> temp-dir
- Remove the remote origin
git remote rm origin
- Add the new remote origin
git remote add origin <url to NEW repo>
- Push the repo to the new remote
# origin can be replaced with a name of your choice
git remote add origin <url to NEW repo>
git push -u origin main