Introduction
Sometimes you have the need to move a repository from one server or provider to another. This is what I´m going to do. Which is simple.
Instructions
On your terminal
- First we create a bare clone of our origin repository.
git clone --bare https://gitoriginalprovider.com/pathto/old-repository.git
-
Create a repository in the destination server or provider and once done copy the URL.
-
Le'ts move to our cloned repository and push to the new destination.
cd old-repository.git
git push --mirror git@github.com:victoryoalli/new-repository.git
- Finally let's delete the old-repository folder from our computer.
cd ..
rm -Rf old-repository
Conclusion
Now we have migrated or repository to a new provi
er