gitgerritgit-review

Is 'git review' a forced push in Gerrit?


I am bit confused about how git review works ?

I got the official documentation here fine manual but am still unable to understand how modifying a downloaded change and then comitting and pushing it using git commit --amend and git review works with simple push ?

I mean, isn't this same as rewriting history/making changese to pushed commit ?

Also there is git review -R, wondering when n why to use that ?


Solution

  • I found my complete answer here. Comments from torek and Marcelo also helped

    Basically, pushing to gerrit is not pushing to branch but a staging area(pending changes) which are references to the branches to which eventually each of the commits will be merged

    These refs are also not exactly refs but some Gerrit magic to fool the client into belief of there existance