Talk:Git/Creating new repositories

About this board

Creating a repo in Gerrit but importing content from elsewhere

4
MarcoAurelio (talkcontribs)

Hi there. I see that it is not infrequent that requests for creating gerrit repositories often include a request to import content from elsewhere (GitHub mostly). Do we have a method/system/way to do so? I could clearly git pull the contents of the repo and git push to the newly created repo, but that's not really an import but an ugly copy-paste :) Thanks for your help. Best regards.

Hashar (talkcontribs)

The way I have been doing it:

git clone --mirror <github url>
git remote add gerrit <gerrit url>
git push --mirror gerrit

The result is an exact copy, including references to github pull requests.

One has to get additional permissions on the Gerrit repo, notably being able to push to all refs (refs/*).

MarcoAurelio (talkcontribs)
MarcoAurelio (talkcontribs)
Reply to "Creating a repo in Gerrit but importing content from elsewhere"
There are no older topics