[On-Prem / Docker] How to migrate a local git repository to space?

Hello,

I am trying to migrate a git repository into space. Via the https://www.jetbrains.com/help/space/create-a-repository.html#new-migration method. What options do I need to set in the fields in order to import a local file based repository? Any combination I tried so far failed with "Connection failed".

Thank you for your help.

0
2 comments

Niklas Karcher, do you mean the Git repo is stored locally and has no remote? If so, the process should be the following:

1. create an empty repo in Space (without the Initialize repository option);
2. create a bare clone of the local repo:

git clone --bare /path/to/local/repository /tmp/bare-clone.git

3. change the remote in the bare clone repo to the Space one:

git remote set-url origin git@git.jetbrains.space/o/p/bare-clone.git

4. push the repo to the remote:

git push --mirror origin
0

Wonderful, the without the Initialize repository option was what I was looking for. I must have overlooked it.

Thank your for the quick help!

0

Please sign in to leave a comment.