MSI
MSI

Reputation: 33

How to get previous patch in gerrit

I am Sajid, I like to know Is it possible that I can go back to my previous patch in my commit. I can explain: I commit something. On the way to delivery, i fixed and update things and pushed into gerrit with commit --amend. But what I am experiencing now my last patch is a faulty so I like to go back to previous patch. and I don't know how can i point to my previous patch. And I also like to know will it be the same procedure even If I go to any previous patch. thanks in advance.

Upvotes: 3

Views: 6021

Answers (1)

laplasz
laplasz

Reputation: 3497

As this answer said, patchsets can not be reverted. so first you have to checkout one of the previous patchset. you can get the command from Gerrit review board at each patchset download panel. For example:

git fetch https://android.googlesource.com/kernel/tegra refs/changes/43/69243/2 && git checkout FETCH_HEAD

After checking it out amend it to generate new commit hash then pushed again as a new patchset.

Upvotes: 7

Related Questions