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

Buck build failing for “events-logs” Gerrit plugin (jar)
Disable direct push and allow Gerrit push
Set “topic” of multiple patches simultaneously in gerrit
Using Gerrit to restrict read access to a git branch
Is it possible to search for commit by Change-Id in Gerrit?
Why is the gerrit change-id commit-hook not a push-hook?
LDAP changed acccount Full Name is not displaying in gerrit web page
Can I change the order of verification and code review in gerrit
Is it possible to make review optional on any particular branch in gerrit?
customize logo on home page gerrit
Failed to start gerrit service
How to get previous patch in gerrit
Integrate Gitolite with Gerrit ACL.
How to display reset password link on gerrit portal?
How to hide line numbers on Gerrit
Gerrit:change authenticate mode from http to ldap

Categories

HOME
gerrit
webpack
reflection
c#-4.0
plot
homebrew
fancybox
communication
php-7.1
vb.net-2010
moonmail
gz
phaser
windows-phone-7
static-libraries
decomposition
quartz-scheduler
reverse-proxy
restful-authentication
pepper
dynamic-featured-image
kannel
replaceall
react-chartjs
google-rich-snippets
stormpath
key-value-observing
galsim
geopositioning
ghost4j
atl
vxworks
disassembling
x11-forwarding
neuroscience
unspecified
hilbert-curve
uft-api
webdriver-manager
opshub
awt
android-tabhost
texmaker
fakeiteasy
apple-news
avconv
smartcontracts
termination
errordocument
mplayer
recursive-datastructures
colorama
forever
feeds
nbconvert
hittest
deadbolt-2
color-picker
database-optimization
asp.net-4.5
autorest
multiple-regression
qcustomplot
python-stackless
captivenetwork
two-factor-authentication
wapiti
freedesktop.org
qtableview
event-bubbling
e10s
python-green
oxwall
xcode-6.2
zend-route
php-5.4
comexception
transcoding
farseer
dexterity
dotnetnuke-5
easy-install
gwt-rpc
plasma
free-variable
distutils
hamiltonian-cycle
unc
gil
errai
regsvr32
netdna-api
boost-filesystem
gnu-prolog
javax.script
yetanotherforum
krl
propagation
lpeg
asp.net-mvc-areas
nsviewanimation
libs
mtj
premature-optimization

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App