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 git@example.com/upstream-repository.git
$ cd upstream-repository.git
$ git push --mirror git@example.com/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.