Recently, i found a Gitlab alternative called Gogs.
Any suggestion for migrating repo in Gitlab to Gogs? I m not expecting all of it of course, just as much as possible.
The correct steps for mirroring a repo is:
$ git clone --mirror [email protected]/upstream-repository.git
$ cd upstream-repository.git
$ git push --mirror [email protected]/new-location.git
Note: Do not use git push --mirror
if you did not clone the repo with git clone --mirror
. Also, git clone --mirror
is preferred over git clone --bare
as it will clone all git notes and attributes as well.
Reference: http://blog.plataformatec.com.br/2013/05/how-to-properly-mirror-a-git-repository/
Clone localy the bare git repo (=server side repo) and push it as a mirror to new repo:
git clone --bare http://my.gitlab.project.git
cd project.git
git push --mirror http://my.gogs.project.git
This will push all your commits, branches, tags etc. This will work for any git repo, whatever it's hosted on gitlab, gog, github, etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With