Skip to content

Instantly share code, notes, and snippets.

@rs-randallburt
Created July 9, 2013 21:35
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 rs-randallburt/5961492 to your computer and use it in GitHub Desktop.
Save rs-randallburt/5961492 to your computer and use it in GitHub Desktop.
Add gerrit dependency to your change.
git fetch --all # Make sure we have latest info from the repository
git review -d 1234 # Gerrit change number of the change you want as dependency ("parent")
git branch # Take note of the review/* branch that was created for this, it has an "*" in front of it
git checkout bug/1234 # Check out the local topic branch of your change
git rebase review/john/7000 # The branch name of the gerrit change we checked out earlier
# Resolve conflicts if needed,
git log -n5 --decorate --pretty=oneline # Verify that the last 5 entries of the log now start with:
# * (HEAD, bug/1234) your change
# * (review/john/700) the dependency
# * (gerrit/master)
git push gerrit HEAD:refs/for/master # Use this instead of `git review`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment