Skip to content

Instantly share code, notes, and snippets.

@vorburger
Last active February 4, 2019 16:25
Show Gist options
  • 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://[email protected]:29418/odlparent.git (fetch)
gerrit ssh://[email protected]:29418/odlparent.git (push)
origin https://git.opendaylight.org/gerrit/odlparent (fetch)
origin https://git.opendaylight.org/gerrit/odlparent (push)
vorburger [email protected]:vorburger/odlparent.git (fetch)
vorburger [email protected]: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