I am configuring Gerrit and I would like to avoid writing:
git push gerrit HEAD:refs/for/master
I would like to write:
Those of you who want to push only to master branch through gerrit, add the following to .git\config
[remote "review"]
push = HEAD:refs/for/master
pushurl = ssh://GERRIT_URL:29418/PROJECT_NAME
or execute in project dir
git config remote.review.push HEAD:refs/for/master
git config remote.review.pushurl ssh://GERRIT_URL:29418/PROJECT_NAME
Then you can use
git push review
to push to Gerrit. Using this method you can push from any of your local branches and the data will always go to master branch