Often times the initial patch submitted may have to be amended (e.g to fix build issues and/or address review comments), follow below steps to perform amend.
- Reset your local (required only if your local is out of sync and backup any files updated you would like to retain)
- git reset --hard origin/master
- Checkout the patch you want to edit/amend
- You can get this exact URL by clicking the 3 vertical dot buttons on right corner in gerrit ui and then click “Download Patch”
- For e.g - git fetch https://gerrit.onap.org/r/dcaegen2/services refs/changes/73/130673/1 && git checkout FETCH_HEAD
- Make the required edits
- Add updated files and Commit as amend (instead of new commit)
- git add <files edited>
- git commit -as --amend
- Push the patch for review
- git review