Relocating Git repository to new URL

The best way I found to do this was by running these two commands:

git clone --mirror old-remote-url-ending-in-dot-git

then move into the directory (ending in .git) that would be created, and run this command:

git push --mirror new-remote-url-ending-in-dot-git

All existing branches and tags would get pushed at one fell swoop.