gerrit


How to change a patchset and push it as a new one?


Is it possible to fetch an existing patchset (that has not been merged into my local machine), change and push it as a new Patch Set?
#Uncletall put all the steps there and the link, the only thing is that you should not delete the changeId and you should do a git commit --amend. I am giving him a +1.
It should be like this
On Gerrit, go to the review, select "checkout", on the Download field as opposed to "pull", "cherry-pick", or "patch", then copy the command.
On the git project paste the copied link from above
This will create a detached head, which is a branch with no name (I've been through the desert on a horse with no name, It felt good to be out of the rain.)
Name that horse! git checkout -b new_branch_name
Change what you want and do a git add on the files you want.
Do git commit --amend and keep the same Change-Id.
Push your changes:
git push origin <new_branch_name>:refs/for/<thatgerritbranchyouwanttochange>
Consult Trying out a Change in the official documentation.
Here is what you do:
Checkout the change as described in the documentation
Create a local branch from the FETCH_HEAD
Modify your code
Commit the change using git --amend and remove the Change-Id in the commit message
A new Change-Id will automatically be added and this will result in a new Change Set
Push your change for review and Gerrit will see it as a new Change Set
As pointed out by #magnus-bäck, I was describing how to create a new Change-Set. If you want to add a new Patch Set to the current review you should NOT remove the Change-Id.
Just follow the below steps:
cherry-pick your patch (from gerrit UI) to your machine.
Modify the content and run git add <modified file>.
Amend the last commit using git commit --amend that pops up a COMMIT-EDITMGS window. Save it accordingly.
Push your change to gerrit using git push origin HEAD:refs/for/branch_name
It will create a new patch set.

Related Links

Gerrit rejected push for valid LDAP member
Gerrit submit change after abandoning its parent
Gerrit - Reload Plugins to incorporate changes
Adding gerrit label, but not able to see it properly in review page
Make a list inside another list in a gerrit comment
How to assign access rights to a Gerrit project using API / SSH?
How to change a patchset and push it as a new one?
Gerrit patch comparision for Sql files
How to 'reply done' in Gerrit when I address people code review comment
How to search for changesets in Gerrit than need to be rebased?
Gerrit GitBlit Plugin shows no Branch Graph
Bad permissions for Gerrit Administrator
Using REST APIs
Gerrit trackingid not working
Gerrit: remote rejected (you are not allowed to upload merges) even though I allowed “Push merge commit”
gerrit: access gerrit repositories as root user by using public key of another user

Categories

HOME
maven
log4j
wso2-am
variables
magnific-popup
tinymce
sd-card
mean-stack
jsp-tags
baqend
installshield
ezpublish
ios-charts
qore
dacpac
gnupg
u-sql
size
percona
dynamics-crm-online
serverless-framework
django-simple-history
angular-ui
database-replication
jqwidget
openedx
crystal-reports-2008
lldb
reverse-proxy
xlsxwriter
one-hot-encoding
tokenize
csrf-protection
facebook-instant-articles
dcevm
java-7
xpages-ssjs
django-storage
wpfdatagrid
phpfox
rst2pdf
ping
large-file-upload
lightswitch-2013
binary-data
data-manipulation
copying
protovis
amazon-kinesis-kpl
hexo
io-redirection
sharefile
twitch
document.write
webdriver-manager
sas-visual-analytics
vao
jquery-validate
jlink
typescript1.8
idisposable
directory-structure
snmptrapd
dtexec
orthogonal
ado.net-entity-data-model
etsy
gridview-sorting
contact-list
blackberry-10
captivenetwork
iad
ios8-today-widget
collapse
fouc
mmc
formatjs
dd
android-nested-fragment
asp.net-web-api-odata
internet-connection
xojo
yorick
dealloc
centos5
jmapviewer
html4
android-screen-support
free-variable
ohm
boost-filesystem
stage
xmlspy
xdomainrequest
propagation
gdlib
mirah
web-architecture
brewmp
exchange-server-2003
putchar

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App