Thread:Talk:Git/Workflow/Windows/git push-for-review and creating amendments for a patch-set/reply (3)

Ok, first - Gerrit "topic" have nothing to do with git branches. It's just an addition to the branch name specified on the command line. It's just an arbitrary text (you may write anything in your topic, no need to have branch or something like this).

So,

git push gerrit HEAD:refs/for/master/bug/123

will push your changes into "gerrit" remote (can be something else - check "git remote -v") and it says please push local HEAD (all commits until the most recent one here right now in this branch) on to "refs/for/master/bug/123" remote reference. Gerrit takes this reference "refs/for/master/bug/123" and interprets it this way: "it's meant for branch master, but please put it for review first and don't push directly" and then "the rest, i.e. bug/123 is a topic name".

If you have a fixed alias (git push-for-review) those parameters are pre-defined (probably to "git push gerrit HEAD:refs/for/master" only).

"git-review" does that for you - takes the local branch name and sets the topic to be the same. But that's only a kind of convention.