Yuriy Taraday <yorik....@gmail.com> writes: > I have series of commits that can be applied separately and can be treated > as separate improvements in my branch. > That commits were there before I knew that I should install Gerrit hook. > Now I have bunch of commits without Change-Id while commit --amend works > only with the last one. How can I edit previous commits?
One way to do that would be to make a new branch, and cherry-pick each of the commits in order onto that branch, and after cherry-picking each, run git commit --amend to cause the change-id hook to run. If they are independent of each other, you might want to take the time to rebase each one as you go. If not, that's fine, Gerrit will wait till they are all approved before applying them. Something like: git checkout master git checkout -b temp git cherry-pick <oldest sha1 of patch series> git commit --amend git cherry-pick <2nd oldest sha1 of patch series> git commit --amend ... git cherry-pick <newest sha1 of patch series> git commit --amend git review However, we turned on the requirement to have Change-Ids to _prevent_ problems, not _cause_ them. Since this isn't likely to happen again (now that you have the change-id hook installed) feel free to find Monty or I (mtaylor or jeblair) in IRC, and we can temporarily remove the Change-Id requirement and then you can push your patches as they are. -Jim _______________________________________________ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp