Two simple git commands to move a git repository form one server to another (example: from github to gitlab)

Clone from the old server with the –bare option:

git clone --bare ssh://your.old.repository

Push to your new server with the –mirror option:

git push --mirror ssh://your.new.repository