Skip to content

Instantly share code, notes, and snippets.

@vorburger
Last active February 4, 2019 16:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vorburger/33562b085133fe4a8ba1b9cd7e28953a to your computer and use it in GitHub Desktop.
Save vorburger/33562b085133fe4a8ba1b9cd7e28953a to your computer and use it in GitHub Desktop.
OpenDaylight GitHub PR to Gerrit
http://blog2.vorburger.ch/2019/02/how-to-transfer-github-pull-requests-to.html
This is the documentation for how during 2018 I used to go from
the Version Bump Pull Requests proposed by Dependabot on
https://github.com/vorburger/odlparent/pulls
to https://git.opendaylight.org/gerrit/#/q/topic:dependabot
cd /home/vorburger/dev/ODL/git/odlparent
$ git remote -v
gerrit ssh://vorburger@git.opendaylight.org:29418/odlparent.git (fetch)
gerrit ssh://vorburger@git.opendaylight.org:29418/odlparent.git (push)
origin https://git.opendaylight.org/gerrit/odlparent (fetch)
origin https://git.opendaylight.org/gerrit/odlparent (push)
vorburger git@github.com:vorburger/odlparent.git (fetch)
vorburger git@github.com:vorburger/odlparent.git (push)
using https://hub.github.com
with the following ~/bin/github2gerrit.sh :
#!/bin/sh
set -euxo pipefail
git checkout master
git pull
git push vorburger
hub checkout $1
git rebase master
git commit -s --amend --reset-author
git review -D -t dependabot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment