Clone a git repository with all branches and tags

In order to clone a git repository including all branches and tags you need to use two parameters when cloning the old and pushing to the new repository respectively:

git clone --bare
cd old-repo
git push --mirror

Of course, the URLs to your repository might look different depending on the protocol used, username required, etc.

For a user git using the git protocol, it could be