~fhusson

How to Migrate a Git repository to an another server

Step 1 : Create an empty repository on the destination server

Don’t init the new repository with files like README.md

Step 2 : Git mirror it

git clone --mirror [email protected]:path/to/my/repo.git
cd repo
git push --mirror [email protected]:path/to/my/new/repo.git

It’s done !

Discuss on Twitter