On Thu, Jul 09, 2015 at 03:47:35AM -0700, Brijesh Somu wrote:
> We were adding a 3rd party code with previous git history changes to our
> gerrit. This has resulted in 900+ commit messages.
>
the smartness of pushing to refs/for/branch instead of branch while not
having the server configured to require change-ids in commits uploaded
for review (unless that imported history came from another gerrit, in
which case this cheap protection wouldn't have helped anyway). ;)
> I dont want all these commits now, pls suggest how i can delete all these
> permanently from the server.
>
you could use the force-draft plugin to turn all these changes into
drafts, which you can then delete (you can script that via the REST
api).
> I am using the h2 database.
>
that's not relevant for the suggested approach.
well, in fact, it probably isn't relevant even if you choose to hack the
database manually, as the gsql interface abstracts that mostly.