BTR Naidu
BTR Naidu

Reputation: 1101

Moving git repos to gitlab

I have git server running over ssh. All git repos are under /opt/git/repos folder on my git server.

Now on the same server I installed gitlab. The url to the server remains the same. The folder where gitlab looks for repos is /opt/gitlab.

My question is, how do I move / import my existing repos under /opt/git/repos into /opt/gitlab so that gitlab can see them?

I am doing this on centos 6.x

Upvotes: 0

Views: 229

Answers (1)

BTR Naidu
BTR Naidu

Reputation: 1101

Performed below steps:

  1. Crate a project for the git repo to be imported using gitlab gui.
  2. Executed below commands on the local system where I have the git repos cloned.

$ git remote add gitlab http://git.xxx.com/username/my-git-repo.git#

$ git push gitlab --mirror

Please note that I have copied the http address of the git repo from the gui after creating it.

Upvotes: 1

Related Questions