uwolfer / gerrit-intellij-plugin

Gerrit Code Review Tool Integration for the IntelliJ Platform
Apache License 2.0
495 stars 103 forks source link

Pushing to Gerrit should allow reset to previous commit #387

Open ks2k2d opened 4 years ago

ks2k2d commented 4 years ago

Preparation:

Start in master branch. commit a change push the change to Gerrit (note that the branch should also stay master (refs/for/master). Now, check the remote master and notice it doesn't have your commit. However, your local master does have the commit.

If another commit is approved and submitted into master, you will need to go through a painful process to pull the changes in your local master.

Maybe you could include a checkbox on the push window that would be something like "reset branch before this commit", which would then run: git reset --hard HEAD^ after git push origin HEAD:/refs/for/master

That is, by selecting this option, the commit which is submitted to Gerrit should disappear from the local master.