Created
August 1, 2014 14:10
-
-
Save boris-42/67f0d5ce3ffadd27170f to your computer and use it in GitHub Desktop.
Multiple patches git & gerrit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Some useful tips with gerrit: | |
# Work on your changes always in specific branch: | |
$ git checkout master | |
$ git checkout -b your_branch | |
# Rebasing your patches: | |
$ git checkout master # go to the master | |
$ git remote update # fetch new patches | |
$ git pull # update master | |
$ git checkout - # back to your branch | |
$ git rebase master | |
# fix merge conflict | |
$ git rebase --continue | |
# repeat if it si required | |
# Chaning patch K that is in middle of N patches of your branch | |
$ git rebase -i <hash of commit that is before commit K> | |
# put instead of "pick" "e" on the commit that you would like to change | |
# do any changes in patch | |
$ git add <all files that were changed> | |
$ git commit --amend | |
$ git rebase -i # to finish rebasing | |
$ git review -R # to update all patches on review | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment