Skip to content

Instantly share code, notes, and snippets.

@stevemar
Last active January 23, 2024 19:11
Show Gist options
  • Select an option

  • Save stevemar/06ace005f82691435d0b to your computer and use it in GitHub Desktop.

Select an option

Save stevemar/06ace005f82691435d0b to your computer and use it in GitHub Desktop.
git cheatsheet
Rebase On Dependent - https://wiki.openstack.org/wiki/Gerrit_Workflow#Rebase_On_Dependent
Gerrit Rebase Button
Click "Rebase" button in the Gerrit UI under your patch set.
Local rebasing.
This requires copying the "cherry-pick" option provided in the child's patch set details of the Gerrit UI.
The reason git review -R is done is because it should be up to the parent to rebase based on its parent. If a conflict occurs it should be their responsibility to fix the conflict and your responsibility to rebase off of that fix.
1. Checkout and create local branch of the dependent review - git review -d $PARENT_CHANGE_NUMBER
2. Cherry-pick your review's most recent patch set - copied from Gerrit UI
3. Push up - git review -R
Undo a git commit amend - http://stackoverflow.com/questions/1459150/how-to-undo-git-commit-amend-done-instead-of-git-commit
git reflog (to find the number)
git reset --soft HEAD@{number}
git commit -C HEAD@{number}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment