git alias for HEAD:refs/for/master

前端 未结 8 2228
予麋鹿
予麋鹿 2020-12-02 09:18

I am configuring Gerrit and I would like to avoid writing:

git push gerrit HEAD:refs/for/master

I would like to write:

8条回答
  •  离开以前
    2020-12-02 09:28

    Why don't create bash alias?

    alias review="git push gerrit HEAD:refs/for/master"
    

    Now you can just type:

    review
    

    If you want to work on more than one gerrit branch, check my bash helpers for that: https://github.com/tomwys/gerrit-bash-commands

提交回复
热议问题