Reputation: 370
I have make a git REPLACE & PUSH success to my repo for a history cut.
But Gerrit still keep the whole history.
For example
before replace: there are commit 1, 2 ,3 both in git and gerrit
after replcace: I made only commit 1 in git and git clone shows only commit 1, thats I want
but there are still commit 1,2,3 in gerrit .
Thats does NOT make sense...why? and how can I clean the gerrit history to keep same with git log?
Here is my command
$ git clone ssh://myrepo.git
$ HP=xxxx #get a commit Hash value as a history point
$ git branch history $HP
$ echo 'new starts here' | git commit-tree $HP^{tree} # return value as new base $NB
$ git rebase --onto $NB $HP
$ git push origin master -f
Any help appreciate.
Upvotes: 0
Views: 347
Reputation: 22321
I think you're confusing the Gerrit changes with Git commits. When you used the "git push origin master -f" you forced the push of the new commit history straight to the Git branch (master) bypassing Gerrit.
The Gerrit changes which were generated due to previously existent commits will continue to exist. Unfortunately, you can't delete Gerrit changes after they were merged (only open or abandoned changes can be deleted). On the other hand, these changes will not have any side effect in the actual Git repository which, apparently, should be as you expected.
Upvotes: 1