a git repository on a share. It’s a fairly easy process and works very well and fast. But now I wanted to move that repo to a new place and searched the webs on how to do this.
I found nothing that was just copy-pasteable but I got it working and it is very easy.
You can find lots of other ways to move a git repo, but they all seemed so complex.
- Moving your git repos and all branches to a new remote repository
- Moving files from one git repository to another preserving history
- How do you move your Git repository from one server to another?
This is therefor going to be a very short blogpost.
You just copy paste the folder containing the bare repo over to the new place.
A while ago I made myself
And then you change the origin of your current repo.
git config remote.origin.url newlocation
And that’s it. Simple as pie.