Notes

Handy tip from https://coderwall.com/p/istvca

Here is how to move your GIT repository from one server to another. In my case I needed to move from GitHub to a private server.

git clone --bare git@github.com:{USERNAME}/{REPOSITORY_NAME}.git
cd {REPOSITORY_NAME}.git
git push --mirror git@myhost.com:my-new-repo.git
cd ..
rm -rf {REPOSITORY_NAME}.git

Now you have to change remote URL

git remote set-url origin git@myhost.com:my-new-repo.git