0

I have chained commits in Gerrit (all in review, not yet merged). I want to update the most recent one without changing previous commits

I've tried updating latest patch (git ammend) and pushing it to Gerrit, it updated all chained commits as well (Including kicking pre-commit for al of them). Cherry-pick only the relevant patch is not possible due to merge-conflicts.

3
  • 1
    What do you mean by "it updated all chained commits"? Did the hashes of these chained commits also get changed? Amending the last commit should only add a new patch set to its pending change. Its parent and ancestors should be unchanged. Commented Jun 19, 2024 at 6:30
  • Meaning there was no code change, just updated the patchset number and kicked all pre-commits. Not sure about the hashes. Commented Jun 19, 2024 at 6:47
  • This doesn't happen for me. Mine warns me I'm uploading 2 or 3 commits, and in the process realizes only the last commit actually changed, and only affects that one. If I look in Gerrit, none of the prior pending commits are affected. Please provide the exact commands you use. Commented Aug 29, 2024 at 13:25

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.