Steps to create a Gerrit review

Git and Gerrit have been quite confusing together sometimes. Specially, in lack of good documentation. Doesn't seem like lot of people are using them efficiently.   
In this post, I am trying to explain that how to create a review in gerrit and modifying a file under one review multiple times.

Pre-requisites: You need commit-msg hook configured in your local repository.
1- scp -p -P <gerritserver>:hooks/commit-msg .git/hooks/
2- curl http:/<gerritserver>:port/tools/hooks/commit-msg

Step-1. Change a file
Step-2. Commit this file using: git commit -a -m "commit message"
Step-3. Push change to gerrit to create a new review. git push gerrit HEAD:refs/for/branchname
Step-4. Amend a file for the next change: git commit --amend <filename>
Step-5. Iterate Step-3,5

No comments:

Post a Comment

Scheduling Repeating Local Notifications using Alarm Manager

Learn about Scheduling Repeating Local Notifications using Alarm Manager in this post .