git push all branches from one remote to another remote

You may want to try cloning your upstream repo with --mirror option and then push to your new remote with --mirror option too

You’ll have the following flow:

git clone <upstream-repo-url/repo.git> --mirror
cd <repo>
git remote add <your-remote-name> <your-remote-url/repo.git>
git push <your-remote-name> --mirror

⚠ Be really careful with the push --mirror as it will delete branches that are on your <your-remote-name>

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)