Gerrit: combine multiple commits into one “change”

One thing you can do a squash merge to a temporary branch and then post that change for review.

git checkout -b feature
git commit -m "start feature"
...
git commit -m "finish feature"
git checkout -b feature-review master
git merge --squash feature
git commit

Now your feature-review branch will contain the same diff relative to master as feature did but with only a single commit.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)