Git-Review troubleshoot :- Build failed due to merge conflict

This error is caused due to merge conflicts between your working branch and master.
* The master branch have changed while you were busy working on your branch.
* You made some \unacceptable\ changes.
How to:


* Checkout to the master branch.
$ git checkout master
* Hard reset to your original master branch
$ git fetch --all
$ git reset --hard origin/master
$ git pull origin master
* Checkout to the working branch
$ git review -d
* Rebase the patch with master
$ git rebase master
# The conflicts will be listed. The easiest way to fix a conflict is to checkout that file with the master. Eg: for a file causing problems – do :
$ git checkout master
REMEMBER:- you need to add the files after you have made the changes via
$ git add
# Once you have fixed all the errors, continue with the rebase process.
$ git rebase --continue
* Amend git commit- This would make sure the new PS would not be sent as a new Change, but as a new Patch set.
$ git commit --amend
* Push the code
$ git review -R

PS:- If you hit with an error while rebasing, always delete the rebase files
$ rm .git/rebase-apply


Git-Review troubleshoot:- Multiple commits error

Playing with code review tools like gerrit and git-review, one of the common error a user can hit with is the Multiple Commits problem.
* You have checked out a new branch, made your edits, added the files and did git commit with necessary commit message.
* You give the command
git review
and git complains that you are going to submit a number of commits.
A sample error screen after giving git review
* You can see your commit on the top of the list with HEAD along with commit id.
* give the following in order
$ git diff HEAD^ This will list down your latest commit. Make sure thats the one you need to commit.
* $ git rebase -i origin/master
This would bring up an interactive git-rebase in your default text editor.
* Delete all the lines, except the line showing your commit message.
* Close the editor. Do $ git review
and it works 🙂 Thanks!