Facing issues with gerrit

I submitted my first change request and I was suggested changes to me made. After making changes I committed and pushed which created a new change request. Then I was asked my by code reviewer to squash the last two commits. I squashed the last two commits to one locally. I tried pushing again and it resulted in a new change request.

This is what I was asked by code reviewer:

can you squash this with the previouis commit instead?
Include the change-id in the commit message to update the previous change request.
How do I accomplish this?

Also I am not able to understand one thing. When the two commits are squashed into one and pushed successfully on gerrit will the comments by the code reviewer in the previous commit still be there?

I want to successfully submit this patch as soon as possible as the GSOC application deadline is . So guys please help me here.

If you look at your original Gerrit ticket, you’ll see the Change-Id Ibee0c9423bae512e42e76f86a347e447c3dc0245

After you’ve amended/squashed the commits in your working branch, you add the line “Change-Id: Ibee0c9423bae512e42e76f86a347e447c3dc0245” in the last line of your commit message. It’ll then be submitted to the same Gerrit ticket.

The past comments of the reviewers should still be there at Gerrit for you to acknowledge with “Done”.

I did that but the comments are not there. Also I can see merge conflicts on the right side. Is it because of merge conflicts?

Your two tickets are conflicting with each other.

This seems to be the one with all the comments:

I suppose you should merge what you need from the other ticket:

and then abandon “1384”.

How do I merge?

Merging via git would only be possible if you were on separate working branches. Seeing as your changes in #1359 are rather minor, I’d suggest to just manually apply them to your current working branch (which I assume you’re committing to for your #1384 changes) and “git commit --amend” them.

1 Like

Phew I was finally able to do it. Thanks!

1 Like

Yay, you made it! :wink:

1 Like