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.
Talk:Git/Creating new repositories/Flow
Appearance
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/*).
Thank you, Hashar. I tested with the GitHub help procedure linked below and it worked. Cfr. <https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/ExternalGuidance/+log/refs/heads/master>. Indeed you need the forge-author-id, push and push-merge privs (I could do it as I was the initial owner of the repo :) ).
I've found https://help.github.com/articles/importing-a-git-repository-using-the-command-line/ - is this what we use?
There are no older topics