
- Gerrit Tutorial
- Gerrit - Home
- Gerrit - Overview
- Setting up Git
- Installation
- Configure Git
- Set Your Username & Email
- Set Up SSH Keys in Gerrit
- Generate New SSH Key
- Add Your SSH Key
- Add SSH Key to your Gerrit Account
- Add SSH Key to use with Git
- Download Extension Using Git
- Prepare to work with Gerrit
- Installing Git-Review
- Configuring Git-Review
- Setting up Git-Review
- How to Submit a Patch
- Gerrit - Update Master
- Gerrit - Create Branch
- Make & Commit Your Change
- Prepare Push change set to Gerrit
- Push your change set to Gerrit
- View the Change / Next Steps
- Editing via the Web-Interface
- How Code is reviewed in Gerrit
- Review Before Merge
- Gerrit - Project Owners
- How to Comment on, review, merge
- Gerrit Useful Resources
- Gerrit - Quick Guide
- Gerrit - Useful Resources
- Gerrit - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Gerrit - Prepare Push Change Set to Gerrit
You need to review the changes in Gerrit before merging them into the master. The changes can be synchronized that have occurred in the master. Use the following command within the branch that you have been working on.
$ git pull --rebase origin master
The above command will fetch the changes or commits from the remote branch and rebase the commits on top of the master.
When you are done with the changes and rebased the commits, you can push your change set to Gerrit for review.
Git pull --rebase is often used when changes do not deserve a separate branch.
Git pull is a combination of git fetch and git merge; where as git pull --rebase is a combination of git fetch and git rebase.
First, run the command as git pull origin master as shown in the following screenshot.

Now use the command as git rebase master to rebase the commits as shown in the following screenshot.
