Question: In gerrit, I usually push multiple small commits together. Once they are reviewed & ready to be submitted, I see button `Submit including parents` on all the changes whereas the 1st change has a `Submit` button.

While getting these changes reviewed, many-a-times the HEAD of target branch moves ahead of the parent commit of my changes. If I were to rebase this whole set of changes on to the current HEAD of the branch, it requires me to do it manually on my local system and again push to gerrit. I was wondering if we have some option like `Rebase including parents` where I could just rebase the whole chain without having to do anything on my local system (only if it has no conflicts)?

Answer: 
> 
> I was wondering if we have some option like Rebase including parents where I could just rebase the whole chain without having to do anything on my local system (only if it has no conflicts)?
> 
> 
> 

No, Gerrit does not have such a feature. The only way to do this in Gerrit's UI is to individually rebase each change in the series, from the bottom up.

I have created a [request on the Gerrit issue tracker](https://bugs.chromium.org/p/gerrit/issues/detail?id=7842) to add a "rebase including parents" feature.
If you'd like the history of the target branch to be as linear as possible, go to the Project->General page and change `Submit Type` as `Rebase If Necessary`. When you press `Submit` or `Submit including parents`, these commits will be rebased onto the current head of the target branch automatically instead of being recursively merged. Note that new patch sets are created for each change in case you need to record the commit sha1. And don't forget to sync your local branch if necessary.

```
git fetch origin <target-branch>
git reset FETCH_HEAD --hard

```